emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA-diffs] /srv/bzr/emacs/elpa r225: Add --no-update, --no-scan option


From: Glenn Morris
Subject: [ELPA-diffs] /srv/bzr/emacs/elpa r225: Add --no-update, --no-scan options for forward-diffs.py
Date: Wed, 23 May 2012 16:25:04 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 225
committer: Glenn Morris <address@hidden>
branch nick: elpa
timestamp: Wed 2012-05-23 16:25:04 -0400
message:
  Add --no-update, --no-scan options for forward-diffs.py
modified:
  admin/forward-diffs.py
=== modified file 'admin/forward-diffs.py'
--- a/admin/forward-diffs.py    2012-05-23 07:38:24 +0000
+++ b/admin/forward-diffs.py    2012-05-23 20:25:04 +0000
@@ -177,6 +177,12 @@
                    help="sender address for forwards")
 parser.add_option( "--create", dest="create", default=False,
                    action="store_true", help="create maintfile")
+parser.add_option( "--no-scan", dest="noscan", default=False,
+                   action="store_true",
+                   help="don't scan for maintainers; implies --no-update")
+parser.add_option( "--no-update", dest="noupdate", default=False,
+                   action="store_true",
+                   help="do not update the maintfile")
 parser.add_option( "--sendmail", dest="sendmail", default=False,
                    action="store_true", help="use sendmail rather than smtp")
 parser.add_option( "--debug", dest="debug", default=False,
@@ -304,26 +310,28 @@
 
     if not pfile in maints:
 
-        lfile.write('Unknown maintainer, scanning file...\n')
-
+        lfile.write('Unknown maintainer\n')
+
+        if opts.noscan: continue
+
+        lfile.write('Scanning file...\n')
         thismaint = []
         thisfile = os.path.join( opts.packagedir, pfile )
-
         scan_file( thisfile, thismaint )
-
         if not thismaint: continue
 
         maints[pfile] = thismaint
 
         ## Append maintainer to file.
-        try:
-            mfile = open( opts.maintfile, 'a' )
-            string = "%-50s %s\n" % (pfile, ",".join(thismaint))
-            mfile.write(string)
-            mfile.close()
-            lfile.write('Appended to maintfile\n')
-        except Exception as err:
-            lfile.write('Error appending to maintfile: %s\n' % str(err))
+        if not opts.noupdate:
+            try:
+                mfile = open( opts.maintfile, 'a' )
+                string = "%-50s %s\n" % (pfile, ",".join(thismaint))
+                mfile.write(string)
+                mfile.close()
+                lfile.write('Appended to maintfile\n')
+            except Exception as err:
+                lfile.write('Error appending to maintfile: %s\n' % str(err))
 
 
     for maint in maints[pfile]:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]