comparison mercurial/hg.py @ 3869:ad6f34c83c3d

Add instructions how to redo/finish failed merge with local working directory. b2ae81a7df29 already implemented this for branch merges.
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 11 Dec 2006 18:09:52 +0100
parents 4f6db0233606
children abaee83ce0a6 0f9381cf9723
comparison
equal deleted inserted replaced
3868:6033d9f28052 3869:ad6f34c83c3d
232 232
233 def _update(repo, node): return update(repo, node) 233 def _update(repo, node): return update(repo, node)
234 234
235 def update(repo, node): 235 def update(repo, node):
236 """update the working directory to node, merging linear changes""" 236 """update the working directory to node, merging linear changes"""
237 pl = repo.parents()
237 stats = _merge.update(repo, node, False, False, None, None) 238 stats = _merge.update(repo, node, False, False, None, None)
238 _showstats(repo, stats) 239 _showstats(repo, stats)
239 if stats[3]: 240 if stats[3]:
240 repo.ui.status(_("There are unresolved merges with" 241 repo.ui.status(_("There are unresolved merges with"
241 " locally modified files.\n")) 242 " locally modified files.\n"))
243 if stats[1]:
244 repo.ui.status(_("You can finish the partial merge using:\n"))
245 else:
246 repo.ui.status(_("You can redo the full merge using:\n"))
247 # len(pl)==1, otherwise _merge.update() would have raised util.Abort:
248 repo.ui.status(_(" hg update %s\n hg update %s\n")
249 % (pl[0].rev(), repo.changectx(node).rev()))
242 return stats[3] 250 return stats[3]
243 251
244 def clean(repo, node, wlock=None, show_stats=True): 252 def clean(repo, node, wlock=None, show_stats=True):
245 """forcibly switch the working directory to node, clobbering changes""" 253 """forcibly switch the working directory to node, clobbering changes"""
246 stats = _merge.update(repo, node, False, True, None, wlock) 254 stats = _merge.update(repo, node, False, True, None, wlock)