##// 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 """update the working directory to node, merging linear changes"""
221 """update the working directory to node, merging linear changes"""
222 stats = _merge.update(repo, node, False, False, None, None)
222 stats = _merge.update(repo, node, False, False, None, None)
223 _showstats(repo, stats)
223 _showstats(repo, stats)
224 branch = repo.changectx(node).branch()
225 repo.opener("branch", "w").write(branch + "\n")
224 if stats[3]:
226 if stats[3]:
225 repo.ui.status(_("There are unresolved merges with"
227 repo.ui.status(_("There are unresolved merges with"
226 " locally modified files.\n"))
228 " locally modified files.\n"))
@@ -229,6 +231,8 b' def update(repo, node):'
229 def clean(repo, node, wlock=None, show_stats=True):
231 def clean(repo, node, wlock=None, show_stats=True):
230 """forcibly switch the working directory to node, clobbering changes"""
232 """forcibly switch the working directory to node, clobbering changes"""
231 stats = _merge.update(repo, node, False, True, None, wlock)
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 if show_stats: _showstats(repo, stats)
236 if show_stats: _showstats(repo, stats)
233 return stats[3]
237 return stats[3]
234
238
General Comments 0
You need to be logged in to leave comments. Login now