--- 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)
--- a/tests/test-rebase-parameters.t Thu May 01 15:12:49 2014 +0200
+++ b/tests/test-rebase-parameters.t Thu May 01 16:47:50 2014 +0200
@@ -84,12 +84,12 @@
[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