mq: more qdelete help text tweaks
authorBrendan Cully <brendan@kublai.com>
Thu, 28 Jun 2007 09:19:08 -0700
changeset 4737 2ececafa5859
parent 4736 04b2c1e27c26
child 4738 c41a404ac387
mq: more qdelete help text tweaks
hgext/mq.py
tests/test-mq-qdelete.out
--- a/hgext/mq.py	Thu Jun 28 08:42:43 2007 -0700
+++ b/hgext/mq.py	Thu Jun 28 09:19:08 2007 -0700
@@ -533,7 +533,8 @@
 
     def delete(self, repo, patches, opts):
         if not patches and not opts.get('rev'):
-            raise util.Abort(_('missing patch name'))
+            raise util.Abort(_('qdelete requires at least one revision or '
+                               'patch name'))
 
         realpatches = []
         for patch in patches:
@@ -1383,11 +1384,13 @@
 def delete(ui, repo, *patches, **opts):
     """remove patches from queue
 
-    With --rev, mq will stop managing the named revisions. The
-    patches must be applied and at the base of the stack. This option
-    is useful when the patches have been applied upstream.
+    The patches must not be applied, unless they are arguments to
+    the --rev parameter. At least one patch or revision is required.
 
-    Otherwise, the patches must not be applied.
+    With --rev, mq will stop managing the named revisions (converting
+    them to regular mercurial changesets). The patches must be applied
+    and at the base of the stack. This option is useful when the patches
+    have been applied upstream.
 
     With --keep, the patch files are preserved in the patch directory."""
     q = repo.mq
@@ -2109,7 +2112,7 @@
         (delete,
          [('k', 'keep', None, _('keep patch file')),
           ('r', 'rev', [], _('stop managing a revision'))],
-         _('hg qdelete [-k] [-r REV]... PATCH...')),
+         _('hg qdelete [-k] [-r REV]... [PATCH]...')),
     'qfold':
         (fold,
          [('e', 'edit', None, _('edit patch header')),
--- a/tests/test-mq-qdelete.out	Thu Jun 28 08:42:43 2007 -0700
+++ b/tests/test-mq-qdelete.out	Thu Jun 28 09:19:08 2007 -0700
@@ -1,5 +1,5 @@
 adding base
-abort: missing patch name
+abort: qdelete requires at least one revision or patch name
 abort: cannot delete applied patch c
 Now at: b
 a