##
## package1 email1
## package2 email2,email3
+##
+## Use "nomail" for the email field to not send a mail.
+##
+## overmaintfile = like maintfile, but takes precedence over it.
### Code:
import datetime
import os
-usage="""usage: %prog <-m maintfile> <-l logfile> <-s sender> [--sendmail]
+usage="""usage: %prog <-m maintfile> <-l logfile> <-s sender>
+ [-o overmaintfile] [--sendmail]
Take a GNU ELPA diff on stdin, and forward it to the maintainer(s)."""
parser = optparse.OptionParser()
help="file listing packages and maintainers")
parser.add_option( "-l", dest="logfile", default=None,
help="file to append output to")
+parser.add_option( "-o", dest="overmaintfile", default=None,
+ help="override file listing packages and maintainers")
parser.add_option( "-s", dest="sender", default=None,
help="sender address for forwards")
parser.add_option( "--sendmail", dest="sendmail", default=False,
mfile.close()
+if opts.overmaintfile:
+ try:
+ ofile = open( opts.overmaintfile, 'r' )
+ except Exception as err:
+ lfile.write('Error opening overmaintfile: %s\n' % str(err))
+ sys.exit(1)
+
+ for line in ofile:
+ if re.match( '^#|^ *$', line ): continue
+ (pack, maint) = line.split()
+ maints[pack] = maint.split(',')
+
+ ofile.close()
+
+
stdin = sys.stdin
text = stdin.read()
maints_seen.append(maint)
+ if maint == "nomail":
+ lfile.write('Not resending, no mail is requested\n')
+ continue
+
+
if maint == msg_from:
lfile.write('Not resending, since maintainer = committer\n')
continue