Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 20875:cc62c9d6887a
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Apr 2014 17:59:06 -0500 |
parents | 6500a2eebee8 3f83fc5cfe71 |
children | 91b47139d0cb |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Apr 01 15:11:19 2014 -0500 +++ b/mercurial/commands.py Tue Apr 01 17:59:06 2014 -0500 @@ -417,7 +417,8 @@ See :hg:`help dates` for a list of formats valid for -d/--date. - Returns 0 on success. + Returns 0 on success, 1 if nothing to backout or there are unresolved + files. ''' if rev and node: raise util.Abort(_("please specify just one revision")) @@ -497,6 +498,9 @@ return repo.commit(message, opts.get('user'), opts.get('date'), match, editor=e) newnode = cmdutil.commit(ui, repo, commitfunc, [], opts) + if not newnode: + ui.status(_("nothing changed\n")) + return 1 cmdutil.commitstatus(repo, newnode, branch, bheads) def nice(node):