diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -228,15 +228,17 @@ def rebase(ui, repo, **opts): 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) diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t --- a/tests/test-rebase-parameters.t +++ b/tests/test-rebase-parameters.t @@ -84,12 +84,12 @@ These fail: [1] $ hg rebase --source '1 & !1' - abort: empty "source" revision set - nothing to rebase - [255] + empty "source" revision set - nothing to rebase + [1] $ hg rebase --base '1 & !1' - abort: empty "base" revision set - can't compute rebase set - [255] + empty "base" revision set - can't compute rebase set + [1] $ hg rebase nothing to rebase - working directory parent is also destination