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 r221: Change it to work on the basis of


From: Glenn Morris
Subject: [ELPA-diffs] /srv/bzr/emacs/elpa r221: Change it to work on the basis of files rather than packages
Date: Wed, 23 May 2012 00:18:02 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 221
committer: Glenn Morris <address@hidden>
branch nick: elpa
timestamp: Wed 2012-05-23 00:18:02 -0700
message:
  Change it to work on the basis of files rather than packages
modified:
  admin/forward-diffs.py
=== modified file 'admin/forward-diffs.py'
--- a/admin/forward-diffs.py    2012-05-23 07:07:07 +0000
+++ b/admin/forward-diffs.py    2012-05-23 07:18:02 +0000
@@ -39,10 +39,10 @@
 ## packagedir = /path/to/packages
 ## sender = your email address
 ## logfile = file to write log to (you might want to rotate/compress/examine 
it)
-## maintfile = file listing packages and their maintainers, with format:
+## maintfile = file listing files and their maintainers, with format:
 ##
-## package1   email1
-## package2   email2,email3
+## package1/file1   email1
+## package2/file2   email2,email3
 ##
 ## Use "nomail" for the email field to not send a mail.
 ##
@@ -219,13 +219,13 @@
     lfile.write('Error opening maintfile: %s\n' % str(err))
     sys.exit(1)
 
-## Each element is package: maint1, maint2, ...
+## Each element is package/file: maint1, maint2, ...
 maints = {}
 
 for line in mfile:
     if re.match( '#| *$', line ): continue
-    (pack, maint) = line.split()
-    maints[pack] = maint.split(',')
+    (pfile, maint) = line.split()
+    maints[pfile] = maint.split(',')
 
 mfile.close()
 
@@ -239,8 +239,8 @@
 
     for line in ofile:
         if re.match( '#| *$', line ): continue
-        (pack, maint) = line.split()
-        maints[pack] = maint.split(',')
+        (pfile, maint) = line.split()
+        maints[pfile] = maint.split(',')
 
     ofile.close()
 
@@ -266,7 +266,7 @@
 
 
 start = False
-packs_seen = []
+pfiles_seen = []
 maints_seen = []
 
 for line in text.splitlines():
@@ -280,27 +280,28 @@
     if re.match( ' *$', line ): break
 
 
-    reg = re.match( 'packages/([^/]+)', line.strip() )
+    reg = re.match( 'packages/([^ ]+)', line.strip() )
     if not reg: break
 
 
-    pack = reg.group(1)
-
-    lfile.write('Package: %s\n' % pack)
-
-    if pack in packs_seen:
-        lfile.write('Already seen this package\n')
+    pfile = reg.group(1)
+
+    lfile.write('File: %s\n' % pfile)
+
+    ## Should not be possible for files (rather than packages)...
+    if pfile in pfiles_seen:
+        lfile.write('Already seen this file\n')
         continue
 
-    packs_seen.append(pack)
-
-
-    if not pack in maints:
+    pfiles_seen.append(pfile)
+
+
+    if not pfile in maints:
         lfile.write('Unknown maintainer\n')
         continue
 
 
-    for maint in maints[pack]:
+    for maint in maints[pfile]:
 
         lfile.write('Maint: %s\n' % maint)
 


reply via email to

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