comparison mercurial/hg.py @ 7546:c7f48414f3ad

add a comment about the need of hg._update()
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 28 Dec 2008 19:59:42 +0100
parents 810ca383da9c
children 7197812e8d44
comparison
equal deleted inserted replaced
7545:55e997c8bf62 7546:c7f48414f3ad
250 (stats[2], _("removed")), 250 (stats[2], _("removed")),
251 (stats[3], _("unresolved"))) 251 (stats[3], _("unresolved")))
252 note = ", ".join([_("%d files %s") % s for s in stats]) 252 note = ", ".join([_("%d files %s") % s for s in stats])
253 repo.ui.status("%s\n" % note) 253 repo.ui.status("%s\n" % note)
254 254
255 def _update(repo, node): return update(repo, node)
256
257 def update(repo, node): 255 def update(repo, node):
258 """update the working directory to node, merging linear changes""" 256 """update the working directory to node, merging linear changes"""
259 stats = _merge.update(repo, node, False, False, None) 257 stats = _merge.update(repo, node, False, False, None)
260 _showstats(repo, stats) 258 _showstats(repo, stats)
261 if stats[3]: 259 if stats[3]:
262 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n")) 260 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n"))
263 return stats[3] > 0 261 return stats[3] > 0
262
263 # naming conflict in clone()
264 _update = update
264 265
265 def clean(repo, node, show_stats=True): 266 def clean(repo, node, show_stats=True):
266 """forcibly switch the working directory to node, clobbering changes""" 267 """forcibly switch the working directory to node, clobbering changes"""
267 stats = _merge.update(repo, node, False, True, None) 268 stats = _merge.update(repo, node, False, True, None)
268 if show_stats: _showstats(repo, stats) 269 if show_stats: _showstats(repo, stats)