diff hgext/mq.py @ 6340:949e607ac544

mq: warn when applying a patch to somewhere other than tip
author Matt Mackall <mpm@selenic.com>
date Fri, 21 Mar 2008 15:44:11 -0500
parents fe8dbbe9520d
children a632a9a57821
line wrap: on
line diff
--- a/hgext/mq.py	Fri Mar 21 21:56:55 2008 +0100
+++ b/hgext/mq.py	Fri Mar 21 15:44:11 2008 -0500
@@ -766,6 +766,9 @@
     def push(self, repo, patch=None, force=False, list=False,
              mergeq=None):
         wlock = repo.wlock()
+        if repo.dirstate.parents()[0] != repo.lookup("tip"):
+            self.ui.status(_("(working directory not at tip)\n"))
+
         try:
             patch = self.lookup(patch)
             # Suppose our series file is: A B C and the current 'top'