diff hgext/mq.py @ 7772:88887054d277

fancyopts: Parse options that occur after arguments. This changes the behavior of qguard in the case of setting negative guards, as -- will now always be required. Fixes issue1402. Doc fixes for mq by mpm.
author Augie Fackler <durin42@gmail.com>
date Tue, 10 Feb 2009 13:26:00 -0600
parents dd08e1e0cea1
children 140429276b63
line wrap: on
line diff
--- a/hgext/mq.py	Tue Feb 10 16:31:52 2009 -0600
+++ b/hgext/mq.py	Tue Feb 10 13:26:00 2009 -0600
@@ -1993,13 +1993,10 @@
 
     With no arguments, print the currently active guards.
     With arguments, set guards for the named patch.
-
-    To set a negative guard "-foo" on topmost patch ("--" is needed so
-    hg will not interpret "-foo" as an option):
-      hg qguard -- -foo
+    NOTE: Specifying negative guards now requires '--'.
 
     To set guards on another patch:
-      hg qguard other.patch +2.6.17 -stable
+      hg qguard -- other.patch +2.6.17 -stable
     '''
     def status(idx):
         guards = q.series_guards[idx] or ['unguarded']
@@ -2499,7 +2496,7 @@
         (guard,
          [('l', 'list', None, _('list all patches and guards')),
           ('n', 'none', None, _('drop all guards'))],
-         _('hg qguard [-l] [-n] [PATCH] [+GUARD]... [-GUARD]...')),
+         _('hg qguard [-l] [-n] -- [PATCH] [+GUARD]... [-GUARD]...')),
     'qheader': (header, [], _('hg qheader [PATCH]')),
     "^qimport":
         (qimport,