Mercurial > hg
changeset 5635:0c608a8d9c5f
merge: make return codes more sensible
Commands that call merge were exiting with a return code equal to the
number of unresolved files. We now return 1 if there are unresolved
files.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 10 Dec 2007 10:24:14 -0600 |
parents | 2f74cfa29e8c |
children | 7e6ddde68a23 |
files | mercurial/hg.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Mon Dec 10 10:23:56 2007 -0600 +++ b/mercurial/hg.py Mon Dec 10 10:24:14 2007 -0600 @@ -280,13 +280,13 @@ # len(pl)==1, otherwise _merge.update() would have raised util.Abort: repo.ui.status(_(" hg update %s\n hg update %s\n") % (pl[0].rev(), repo.changectx(node).rev())) - return stats[3] + return stats[3] > 0 def clean(repo, node, show_stats=True): """forcibly switch the working directory to node, clobbering changes""" stats = _merge.update(repo, node, False, True, None) if show_stats: _showstats(repo, stats) - return stats[3] + return stats[3] > 0 def merge(repo, node, force=None, remind=True): """branch merge with node, resolving changes""" @@ -301,11 +301,11 @@ % (pl[0].rev(), pl[1].rev())) elif remind: repo.ui.status(_("(branch merge, don't forget to commit)\n")) - return stats[3] + return stats[3] > 0 def revert(repo, node, choose): """revert changes to revision in node without updating dirstate""" - return _merge.update(repo, node, False, True, choose)[3] + return _merge.update(repo, node, False, True, choose)[3] > 0 def verify(repo): """verify the consistency of a repository"""