mercurial/commands.py
changeset 6438 a60b711c7ac4
parent 6405 b8346ae5d64b
parent 6423 fb374b1b3911
child 6442 fa5454a451c6
child 6467 65029a3aafc2
--- a/mercurial/commands.py	Sun Mar 30 23:58:02 2008 +0200
+++ b/mercurial/commands.py	Tue Apr 01 08:33:17 2008 +0200
@@ -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