Update of /cvsroot/cvs-syncmail/syncmail
In directory sc8-pr-cvs1:/tmp/cvs-serv10757
Modified Files:
syncmail
Log Message:
- hackish setting of MAILHOST from the command line
- add comment about needing option handling overhaul
Index: syncmail
===================================================================
RCS file: /cvsroot/cvs-syncmail/syncmail/syncmail,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- syncmail 15 Nov 2002 20:51:36 -0000 1.26
+++ syncmail 16 Jan 2003 07:11:19 -0000 1.27
@@ -48,6 +48,11 @@
-c
Produce a context diff (default).
+ -m hostname
+ --mailhost hostname
+ The hostname of an available SMTP server. The default is
+ 'localhost'.
+
-u
Produce a unified diff (smaller).
@@ -282,10 +287,12 @@
# scan args for options
def main():
+ # XXX Should really move all the options to an object, just to
+ # avoid threading so many positional args through everything.
try:
opts, args = getopt.getopt(
- sys.argv[1:], 'hC:cuS:R:qf:',
- ['fromhost=', 'context=', 'cvsroot=',
+ sys.argv[1:], 'hC:cuS:R:qf:m:',
+ ['fromhost=', 'context=', 'cvsroot=', 'mailhost=',
'subject-prefix=', 'reply-to=',
'help', 'quiet'])
except getopt.error, msg:
@@ -317,6 +324,9 @@
verbose = 0
elif opt in ('-f', '--fromhost'):
fromhost = arg
+ elif opt in ('-m', '--mailhost'):
+ global MAILHOST
+ MAILHOST = arg
# What follows is the specification containing the files that were
# modified. The argument actually must be split, with the first component
|