# HG changeset patch # User Olle Lundberg # Date 1395790694 -3600 # Node ID 3b7dfa9bb7896e2fedc8a9626686e234e480e2e7 # Parent e911d1da89df4d2ea6b1f1c0bee94666b8a40fd0 evolve: abort when trying to move a node on top of itself This provides a clearer error message when evolve misstakenly tries to move a changeset on top of itself. Before we got an abort with a cryptic message about trying to rebase a merge changeset. A proper fix to make sure that evolve never tries to move a node on top of itself will come in later patches. diff --git a/hgext/evolve.py b/hgext/evolve.py --- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -738,6 +738,12 @@ def relocate(repo, orig, dest): """rewrite 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: