hgext/rebase.py
changeset 17973 fa6be7b81f77
parent 17922 7f5dab94e48c
child 17989 e8c9b13c7799
--- a/hgext/rebase.py	Mon Nov 26 10:48:24 2012 -0800
+++ b/hgext/rebase.py	Tue Nov 27 16:24:21 2012 -0800
@@ -656,9 +656,12 @@
     #
     # The actual abort is handled by `defineparents`
     if len(root.parents()) <= 1:
-        # (strict) ancestors of <root> not ancestors of <dest>
-        detachset = repo.revs('::%d - ::%d - %d', root, commonbase, root)
+        # ancestors of <root> not ancestors of <dest>
+        detachset = repo.changelog.findmissingrevs([commonbase.rev()],
+                                                   [root.rev()])
         state.update(dict.fromkeys(detachset, nullmerge))
+        # detachset can have root, and we definitely want to rebase that
+        state[root.rev()] = nullrev
     return repo['.'].rev(), dest.rev(), state
 
 def clearrebased(ui, repo, state, collapsedas=None):