Mercurial > public > mercurial-scm > hg-stable
diff hgext/rebase.py @ 21197:cb4223c65f79 stable
rebase: don't abort if we're asked to rebase an empty revset
The documentation says we exit 1 if we have nothing to do, so avoid
breaking that contract when we're passed an empty revset.
This was changed in http://www.selenic.com/hg/rev/a259f7b488ab to
improve the error message; keep the improved message, just not the
abort.
author | Julien Cristau <julien.cristau@logilab.fr> |
---|---|
date | Wed, 23 Apr 2014 13:51:35 +0200 |
parents | 25ee5dbebc6b |
children | 799c494189a9 |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Apr 25 22:34:09 2014 -0400 +++ b/hgext/rebase.py Wed Apr 23 13:51:35 2014 +0200 @@ -222,8 +222,9 @@ if revf: rebaseset = scmutil.revrange(repo, revf) if not rebaseset: - raise util.Abort(_('empty "rev" revision set - ' - 'nothing to rebase')) + ui.status(_('empty "rev" revision set - ' + 'nothing to rebase\n')) + return 1 elif srcf: src = scmutil.revrange(repo, [srcf]) if not src: