mq: qpush shouldn't complain if working dir is at a non-tip head
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Fri, 15 May 2009 15:21:17 +0200
changeset 8433 9a398dd53bcc
parent 8432 94ef2c8ce683
child 8434 4a3e7c380834
mq: qpush shouldn't complain if working dir is at a non-tip head
hgext/mq.py
tests/test-mq-merge.out
tests/test-mq.out
--- a/hgext/mq.py	Fri May 15 10:47:19 2009 +0200
+++ b/hgext/mq.py	Fri May 15 15:21:17 2009 +0200
@@ -885,8 +885,8 @@
     def push(self, repo, patch=None, force=False, list=False,
              mergeq=None, all=False):
         wlock = repo.wlock()
-        if repo.dirstate.parents()[0] != repo.changelog.tip():
-            self.ui.status(_("(working directory not at tip)\n"))
+        if repo.dirstate.parents()[0] not in repo.heads():
+            self.ui.status(_("(working directory not at a head)\n"))
 
         if not self.series:
             self.ui.warn(_('no patches in series\n'))
--- a/tests/test-mq-merge.out	Fri May 15 10:47:19 2009 +0200
+++ b/tests/test-mq-merge.out	Fri May 15 15:21:17 2009 +0200
@@ -19,6 +19,5 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % merge
 merging with queue at refqueue
-(working directory not at tip)
 applying patcha
 now at: patcha
--- a/tests/test-mq.out	Fri May 15 10:47:19 2009 +0200
+++ b/tests/test-mq.out	Fri May 15 15:21:17 2009 +0200
@@ -326,7 +326,7 @@
 adding file changes
 added 1 changesets with 1 changes to 1 files
 patch queue now empty
-(working directory not at tip)
+(working directory not at a head)
 applying bar
 now at: bar
 diff --git a/bar b/bar
@@ -360,7 +360,7 @@
 adding file changes
 added 1 changesets with 1 changes to 1 files
 patch queue now empty
-(working directory not at tip)
+(working directory not at a head)
 applying bar
 now at: bar
 diff --git a/foo b/bleh