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 r222: When the maintainer is unknown, s


From: Glenn Morris
Subject: [ELPA-diffs] /srv/bzr/emacs/elpa r222: When the maintainer is unknown, scan the file, and append it if found.
Date: Wed, 23 May 2012 00:29:15 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 222
committer: Glenn Morris <address@hidden>
branch nick: elpa
timestamp: Wed 2012-05-23 00:29:15 -0700
message:
  When the maintainer is unknown, scan the file, and append it if found.
modified:
  admin/forward-diffs.py
=== modified file 'admin/forward-diffs.py'
--- a/admin/forward-diffs.py    2012-05-23 07:18:02 +0000
+++ b/admin/forward-diffs.py    2012-05-23 07:29:15 +0000
@@ -28,6 +28,9 @@
 ## 1) Create the maintfile (really this is just an optimization):
 ## forward-diffs.py --create -p packagesdir -m maintfile
 
+## You can start with an empty maintfile and normal operation in 2)
+## will append information as needed.
+
 ## 2) Call from eg procmail to forward diffs.  Example usage:
 
 ## :0c
@@ -297,8 +300,27 @@
 
 
     if not pfile in maints:
-        lfile.write('Unknown maintainer\n')
-        continue
+
+        lfile.write('Unknown maintainer, 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))
 
 
     for maint in maints[pfile]:


reply via email to

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