mercurial/commands.py
changeset 6432 b1204fd06c2e
parent 6419 7c36aee46bf5
parent 6423 fb374b1b3911
child 6442 fa5454a451c6
--- 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