# HG changeset patch # User Matt Mackall # Date 1161142483 18000 # Node ID ef2e990f9047d1fe91bc4c5a778daeecc17663f4 # Parent 0f1fd9854cdc5665d4e3c8ed21f9fcdec78e23d6 imported patch foo diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -221,8 +221,6 @@ def update(repo, node): """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")) @@ -231,8 +229,6 @@ def update(repo, node): 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] diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -411,6 +411,9 @@ def update(repo, node, branchmerge, forc recordupdates(repo, action, branchmerge) repo.dirstate.setparents(fp1, fp2) repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) + if not branchmerge: + print "yow!" + repo.opener("branch", "w").write(p1.branch() + "\n") return stats