diff hgext/histedit.py @ 35390:7b73bf1a48d4 stable

histedit: preserve active branch while histediting The branch information was properly preserved in the changeset, but the "active" branch of the working copy could be lost (the branch of the base being used). Histedit used to behave properly in this regard but the case was not tested and regressed 4 years ago in ab2362e1672e.
author Boris Feld <boris.feld@octobus.net>
date Tue, 12 Dec 2017 18:22:11 +0100
parents ee9243715c59
children a51541681b8d
line wrap: on
line diff
--- a/hgext/histedit.py	Tue Dec 12 16:29:26 2017 +0800
+++ b/hgext/histedit.py	Tue Dec 12 18:22:11 2017 +0100
@@ -487,6 +487,7 @@
         repo.ui.pushbuffer(error=True, labeled=True)
         hg.update(repo, self.state.parentctxnode, quietempty=True)
         stats = applychanges(repo.ui, repo, rulectx, {})
+        repo.dirstate.setbranch(rulectx.branch())
         if stats and stats[3] > 0:
             buf = repo.ui.popbuffer()
             repo.ui.write(*buf)