Show More
@@ -280,13 +280,13 b' def update(repo, node):' | |||||
280 | # len(pl)==1, otherwise _merge.update() would have raised util.Abort: |
|
280 | # len(pl)==1, otherwise _merge.update() would have raised util.Abort: | |
281 | repo.ui.status(_(" hg update %s\n hg update %s\n") |
|
281 | repo.ui.status(_(" hg update %s\n hg update %s\n") | |
282 | % (pl[0].rev(), repo.changectx(node).rev())) |
|
282 | % (pl[0].rev(), repo.changectx(node).rev())) | |
283 | return stats[3] |
|
283 | return stats[3] > 0 | |
284 |
|
284 | |||
285 | def clean(repo, node, show_stats=True): |
|
285 | def clean(repo, node, show_stats=True): | |
286 | """forcibly switch the working directory to node, clobbering changes""" |
|
286 | """forcibly switch the working directory to node, clobbering changes""" | |
287 | stats = _merge.update(repo, node, False, True, None) |
|
287 | stats = _merge.update(repo, node, False, True, None) | |
288 | if show_stats: _showstats(repo, stats) |
|
288 | if show_stats: _showstats(repo, stats) | |
289 | return stats[3] |
|
289 | return stats[3] > 0 | |
290 |
|
290 | |||
291 | def merge(repo, node, force=None, remind=True): |
|
291 | def merge(repo, node, force=None, remind=True): | |
292 | """branch merge with node, resolving changes""" |
|
292 | """branch merge with node, resolving changes""" | |
@@ -301,11 +301,11 b' def merge(repo, node, force=None, remind' | |||||
301 | % (pl[0].rev(), pl[1].rev())) |
|
301 | % (pl[0].rev(), pl[1].rev())) | |
302 | elif remind: |
|
302 | elif remind: | |
303 | repo.ui.status(_("(branch merge, don't forget to commit)\n")) |
|
303 | repo.ui.status(_("(branch merge, don't forget to commit)\n")) | |
304 | return stats[3] |
|
304 | return stats[3] > 0 | |
305 |
|
305 | |||
306 | def revert(repo, node, choose): |
|
306 | def revert(repo, node, choose): | |
307 | """revert changes to revision in node without updating dirstate""" |
|
307 | """revert changes to revision in node without updating dirstate""" | |
308 | return _merge.update(repo, node, False, True, choose)[3] |
|
308 | return _merge.update(repo, node, False, True, choose)[3] > 0 | |
309 |
|
309 | |||
310 | def verify(repo): |
|
310 | def verify(repo): | |
311 | """verify the consistency of a repository""" |
|
311 | """verify the consistency of a repository""" |
General Comments 0
You need to be logged in to leave comments.
Login now