--- a/hgext/obsolete.py Mon Aug 20 19:12:20 2012 +0200
+++ b/hgext/obsolete.py Tue Aug 21 02:25:19 2012 +0200
@@ -956,6 +956,9 @@
def buildstate(orig, repo, dest, rebaseset, *ags, **kws):
"""wrapper for rebase 's buildstate that exclude obsolete changeset"""
rebaseset = repo.revs('%ld - extinct()', rebaseset)
+ if not rebaseset:
+ repo.ui.warn(_('whole rebase set is extinct and ignored.\n'))
+ return {}
return orig(repo, dest, rebaseset, *ags, **kws)
def defineparents(orig, repo, rev, target, state, *args, **kwargs):
--- a/tests/test-obsolete.t Mon Aug 20 19:12:20 2012 +0200
+++ b/tests/test-obsolete.t Tue Aug 21 02:25:19 2012 +0200
@@ -474,6 +474,10 @@
should not rebase extinct changeset
+ $ hg --config extensions.hgext.rebase= rebase -s 7 -d 4
+ whole rebase set is extinct and ignored.
+ nothing to rebase
+ [1]
$ hg --config extensions.hgext.rebase= rebase -b 3 -d 4 --traceback
$ hg --config extensions.graphlog= glog -r 'not extinct()' --template='{rev} - {node|short}\n'
@ 11 - 9468a5f5d8b2