Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 6423:fb374b1b3911
backout: reverse changeset belongs on current branch
Backing out a changeset that is before a named branch branchpoint was
making the reverse changeset the tip of the old branch, which is wrong
and very confusing. So instead, we put it on the current named branch.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 29 Mar 2008 12:39:47 -0500 |
parents | 0d4e068e9e52 |
children | b1204fd06c2e a60b711c7ac4 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Mar 29 12:39:47 2008 -0500 +++ b/mercurial/commands.py Sat Mar 29 12:39:47 2008 -0500 @@ -227,7 +227,10 @@ raise util.Abort(_('cannot use --parent on non-merge changeset')) parent = p1 + # the backout should appear on the same branch + branch = repo.dirstate.branch() hg.clean(repo, node, show_stats=False) + repo.dirstate.setbranch(branch) revert_opts = opts.copy() revert_opts['date'] = None revert_opts['all'] = True