# HG changeset patch # User Matt Mackall # Date 1161127820 18000 # Node ID 145a8fde69e611a4de4f0c115f28dd124b9488b3 # Parent 9a6491770b048d5208dd2e5e3aca5a2d14a00af4 Update branch on checkout/update diff -r 9a6491770b04 -r 145a8fde69e6 mercurial/hg.py --- a/mercurial/hg.py Tue Oct 17 18:30:19 2006 -0500 +++ b/mercurial/hg.py Tue Oct 17 18:30:20 2006 -0500 @@ -221,6 +221,8 @@ """update the working directory to node, merging linear changes""" stats = _merge.update(repo, node, False, False, None, None) _showstats(repo, stats) + branch = repo.changectx(node).branch() + repo.opener("branch", "w").write(branch + "\n") if stats[3]: repo.ui.status(_("There are unresolved merges with" " locally modified files.\n")) @@ -229,6 +231,8 @@ def clean(repo, node, wlock=None, show_stats=True): """forcibly switch the working directory to node, clobbering changes""" stats = _merge.update(repo, node, False, True, None, wlock) + branch = repo.changectx(node).branch() + repo.opener("branch", "w").write(branch + "\n") if show_stats: _showstats(repo, stats) return stats[3]