imported patch foo
authorMatt Mackall <mpm@selenic.com>
Tue, 17 Oct 2006 22:34:43 -0500
changeset 3441 ef2e990f9047
parent 3440 0f1fd9854cdc
child 3442 798bcde0c9c2
imported patch foo
mercurial/hg.py
mercurial/merge.py
--- a/mercurial/hg.py	Tue Oct 17 22:26:14 2006 -0500
+++ b/mercurial/hg.py	Tue Oct 17 22:34:43 2006 -0500
@@ -221,8 +221,6 @@
     """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 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]
 
--- a/mercurial/merge.py	Tue Oct 17 22:26:14 2006 -0500
+++ b/mercurial/merge.py	Tue Oct 17 22:34:43 2006 -0500
@@ -411,6 +411,9 @@
         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