diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -439,7 +439,7 @@ def backout(ui, repo, node=None, rev=Non op1, op2 = repo.dirstate.parents() a = repo.changelog.ancestor(op1, node) if a != node: - raise util.Abort(_('cannot backout change on a different branch')) + raise util.Abort(_('cannot backout change that is not an ancestor')) p1, p2 = repo.changelog.parents(node) if p1 == nullid: diff --git a/tests/test-backout.t b/tests/test-backout.t --- a/tests/test-backout.t +++ b/tests/test-backout.t @@ -92,7 +92,7 @@ across branch should fail $ hg backout 1 - abort: cannot backout change on a different branch + abort: cannot backout change that is not an ancestor [255] $ echo c > c $ hg ci -Am2 @@ -108,7 +108,7 @@ should fail should fail $ hg backout 1 - abort: cannot backout change on a different branch + abort: cannot backout change that is not an ancestor [255] $ hg summary parent: 2:db815d6d32e6 tip