Complete.Org: Mailing Lists: Archives: offlineimap: July 2002:
Re: Patch: New -o option; run only once.
Home

Re: Patch: New -o option; run only once.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: Patch: New -o option; run only once.
From: Martijn Pieters <mj@xxxxxxxx>
Date: Fri, 12 Jul 2002 21:29:39 -0400

On Fri, Jul 12, 2002 at 09:23:08PM -0400, Martijn Pieters wrote:
> As promised a patch for ignoring autorefresh as a command line option.

Actually attaching it would help, wouldn't it? *blush*

-- 
Martijn Pieters
| Software Engineer  mailto:mj@xxxxxxxx
| Zope Corporation   http://www.zope.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------


-- Attached file included as plaintext by Ecartis --
-- Desc: run-once-option.patch

Index: offlineimap.py
===================================================================
RCS file: /var/cvs/offlineimap/offlineimap.py,v
retrieving revision 1.49
diff -u -r1.49 offlineimap.py
--- offlineimap.py      12 Jul 2002 01:46:36 -0000      1.49
+++ offlineimap.py      13 Jul 2002 00:52:49 -0000
@@ -29,7 +29,7 @@
     sys.stdout.write(version.cmdhelp + "\n")
     sys.exit(0)
     
-for optlist in getopt(sys.argv[1:], '1a:c:du:h')[0]:
+for optlist in getopt(sys.argv[1:], '1oa:c:du:h')[0]:
     options[optlist[0]] = optlist[1]
 
 if '-d' in options:
@@ -56,6 +56,8 @@
     ui = offlineimap.ui.detector.findUI(config)
 ui.init_banner()
 
+if '-o' in options and config.has_option("general", "autorefresh"):
+    config.remove_option("general", "autorefresh")
 
 metadatadir = os.path.expanduser(config.get("general", "metadata"))
 if not os.path.exists(metadatadir):
Index: offlineimap.1
===================================================================
RCS file: /var/cvs/offlineimap/offlineimap.1,v
retrieving revision 1.2
diff -u -r1.2 offlineimap.1
--- offlineimap.1       11 Jul 2002 20:43:07 -0000      1.2
+++ offlineimap.1       13 Jul 2002 00:52:49 -0000
@@ -2,7 +2,7 @@
 .\" First parameter, NAME, should be all caps
 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
 .\" other parameters are allowed: see man(7), man(1)
-.TH OFFLINEIMAP 1 "July 11, 2002" "John Goerzen" "OfflineIMAP manual"
+.TH OFFLINEIMAP 1 "July 12, 2002" "John Goerzen" "OfflineIMAP manual"
 .\" Please adjust this date whenever revising the manpage.
 .\"
 .\" Some roff macros, for reference:
@@ -33,6 +33,9 @@
 .BI \-d
 ]
 [
+.BI \-o
+]
+[
 .BI \-u " interface"
 ]
 
@@ -236,6 +239,9 @@
 will contain full IMAP protocol in plain text, including passwords, so
 take care to remove that from the debugging output before sending it
 to anyone else.
+.TP
+.B \-o
+Run only once, ignoring any autorefresh setting in the config file.  
 .TP
 .B \-h, \-\-help
 Show summary of options.




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