mercurial/commands.py
changeset 6423 fb374b1b3911
parent 6385 0d4e068e9e52
child 6432 b1204fd06c2e
child 6438 a60b711c7ac4
--- 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