diff -r 626a8e396846 -r b1204fd06c2e mercurial/commands.py --- a/mercurial/commands.py Mon Mar 31 18:49:15 2008 +0200 +++ b/mercurial/commands.py Mon Mar 31 21:49:26 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