Merge with crew-stable
authorMartin Geisler <mg@lazybytes.net>
Fri, 16 Oct 2009 00:45:18 +0200
changeset 9599 f3404b7f37ca
parent 9598 a981ddb16b80 (current diff)
parent 9590 07a62819b309 (diff)
child 9602 fc493cb90bb1
Merge with crew-stable
hgext/mq.py
hgext/rebase.py
tests/test-mq-qpush-fail.out
tests/test-rebase-parameters.out
--- a/hgext/mq.py	Fri Oct 16 00:06:23 2009 +0200
+++ b/hgext/mq.py	Fri Oct 16 00:45:18 2009 +0200
@@ -997,6 +997,8 @@
                 self.ui.warn(_('done\n'))
                 raise
 
+            if not self.applied:
+                return ret[0]
             top = self.applied[-1].name
             if ret[0] and ret[0] > 1:
                 msg = _("errors during apply, please fix and refresh %s\n")
@@ -2618,7 +2620,7 @@
         (pop,
          [('a', 'all', None, _('pop all patches')),
           ('n', 'name', '', _('queue name to pop')),
-          ('f', 'force', None, _('forget any local changes'))],
+          ('f', 'force', None, _('forget any local changes to patched files'))],
          _('hg qpop [-a] [-n NAME] [-f] [PATCH | INDEX]')),
     "^qpush":
         (push,
--- a/hgext/rebase.py	Fri Oct 16 00:06:23 2009 +0200
+++ b/hgext/rebase.py	Fri Oct 16 00:45:18 2009 +0200
@@ -464,9 +464,9 @@
         ('s', 'source', '', _('rebase from a given revision')),
         ('b', 'base', '', _('rebase from the base of a given revision')),
         ('d', 'dest', '', _('rebase onto a given revision')),
-        ('', 'collapse', False, _('collapse the rebased revisions')),
-        ('', 'keep', False, _('keep original revisions')),
-        ('', 'keepbranches', False, _('keep original branches')),
+        ('', 'collapse', False, _('collapse the rebased changesets')),
+        ('', 'keep', False, _('keep original changesets')),
+        ('', 'keepbranches', False, _('keep original branch names')),
         ('c', 'continue', False, _('continue an interrupted rebase')),
         ('a', 'abort', False, _('abort an interrupted rebase')),] +
          templateopts,
--- a/tests/test-mq-qpush-fail	Fri Oct 16 00:06:23 2009 +0200
+++ b/tests/test-mq-qpush-fail	Fri Oct 16 00:45:18 2009 +0200
@@ -53,4 +53,10 @@
 echo '% now we expect the push to fail, but it should NOT complain about patch1'
 hg qpush
 
+echo '% preparing qpush of missing patch with no patch applied'
+hg qpop -a
+rm .hg/patches/patch1
+echo '% qpush should fail the same way as below'
+hg qpush
+
 true # happy ending
--- a/tests/test-mq-qpush-fail.out	Fri Oct 16 00:06:23 2009 +0200
+++ b/tests/test-mq-qpush-fail.out	Fri Oct 16 00:45:18 2009 +0200
@@ -30,3 +30,9 @@
 applying patch2
 unable to read patch2
 now at: patch1
+% preparing qpush of missing patch with no patch applied
+popping patch1
+patch queue now empty
+% qpush should fail the same way as below
+applying patch1
+unable to read patch1
--- a/tests/test-rebase-parameters.out	Fri Oct 16 00:06:23 2009 +0200
+++ b/tests/test-rebase-parameters.out	Fri Oct 16 00:45:18 2009 +0200
@@ -18,9 +18,9 @@
  -s --source        rebase from a given revision
  -b --base          rebase from the base of a given revision
  -d --dest          rebase onto a given revision
-    --collapse      collapse the rebased revisions
-    --keep          keep original revisions
-    --keepbranches  keep original branches
+    --collapse      collapse the rebased changesets
+    --keep          keep original changesets
+    --keepbranches  keep original branch names
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
@@ -46,9 +46,9 @@
  -s --source        rebase from a given revision
  -b --base          rebase from the base of a given revision
  -d --dest          rebase onto a given revision
-    --collapse      collapse the rebased revisions
-    --keep          keep original revisions
-    --keepbranches  keep original branches
+    --collapse      collapse the rebased changesets
+    --keep          keep original changesets
+    --keepbranches  keep original branch names
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
@@ -74,9 +74,9 @@
  -s --source        rebase from a given revision
  -b --base          rebase from the base of a given revision
  -d --dest          rebase onto a given revision
-    --collapse      collapse the rebased revisions
-    --keep          keep original revisions
-    --keepbranches  keep original branches
+    --collapse      collapse the rebased changesets
+    --keep          keep original changesets
+    --keepbranches  keep original branch names
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
@@ -102,9 +102,9 @@
  -s --source        rebase from a given revision
  -b --base          rebase from the base of a given revision
  -d --dest          rebase onto a given revision
-    --collapse      collapse the rebased revisions
-    --keep          keep original revisions
-    --keepbranches  keep original branches
+    --collapse      collapse the rebased changesets
+    --keep          keep original changesets
+    --keepbranches  keep original branch names
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file