Mercurial > hg-stable
diff hgext/rebase.py @ 21210:799c494189a9 stable
rebase: empty revset should be a gentle no-op with exit code 1, not an error
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 01 May 2014 16:47:50 +0200 |
parents | cb4223c65f79 |
children | 5b70ece79ea7 2ba6c9b4e0eb |
line wrap: on
line diff
--- a/hgext/rebase.py Thu May 01 15:12:49 2014 +0200 +++ b/hgext/rebase.py Thu May 01 16:47:50 2014 +0200 @@ -228,15 +228,17 @@ elif srcf: src = scmutil.revrange(repo, [srcf]) if not src: - raise util.Abort(_('empty "source" revision set - ' - 'nothing to rebase')) + ui.status(_('empty "source" revision set - ' + 'nothing to rebase\n')) + return 1 rebaseset = repo.revs('(%ld)::', src) assert rebaseset else: base = scmutil.revrange(repo, [basef or '.']) if not base: - raise util.Abort(_('empty "base" revision set - ' - "can't compute rebase set")) + ui.status(_('empty "base" revision set - ' + "can't compute rebase set\n")) + return 1 rebaseset = repo.revs( '(children(ancestor(%ld, %d)) and ::(%ld))::', base, dest, base)