##// END OF EJS Templates
Update branch on checkout/update
Matt Mackall -
r3416:145a8fde default
parent child Browse files
Show More
@@ -221,6 +221,8 b' def update(repo, node):'
221 221 """update the working directory to node, merging linear changes"""
222 222 stats = _merge.update(repo, node, False, False, None, None)
223 223 _showstats(repo, stats)
224 branch = repo.changectx(node).branch()
225 repo.opener("branch", "w").write(branch + "\n")
224 226 if stats[3]:
225 227 repo.ui.status(_("There are unresolved merges with"
226 228 " locally modified files.\n"))
@@ -229,6 +231,8 b' def update(repo, node):'
229 231 def clean(repo, node, wlock=None, show_stats=True):
230 232 """forcibly switch the working directory to node, clobbering changes"""
231 233 stats = _merge.update(repo, node, False, True, None, wlock)
234 branch = repo.changectx(node).branch()
235 repo.opener("branch", "w").write(branch + "\n")
232 236 if show_stats: _showstats(repo, stats)
233 237 return stats[3]
234 238
General Comments 0
You need to be logged in to leave comments. Login now