hgext/evolve.py
branchstable
changeset 911 3b7dfa9bb789
parent 901 4f84b3307dc2
child 912 0c1907a65b9f
--- a/hgext/evolve.py	Wed Mar 26 23:57:15 2014 +0100
+++ b/hgext/evolve.py	Wed Mar 26 00:38:14 2014 +0100
@@ -738,6 +738,12 @@
 def relocate(repo, orig, dest):
     """rewrite <rev> on dest"""
     try:
+        if orig.rev() == dest.rev():
+            raise util.Abort(_('tried to relocade a node on top of itself'),
+                             hint=_("This shouldn't happen. If you still "
+                                    "need to move changesets, please do so "
+                                    "manually with nothing to rebase - working directory parent is also destination"))
+
         rebase = extensions.find('rebase')
         # dummy state to trick rebase node
         if not orig.p2().rev() == node.nullrev: