changeset 17973:fa6be7b81f77

rebase: use revlog.findmissingrevs to compute detach set
author Siddharth Agarwal <sid0@fb.com>
date Tue, 27 Nov 2012 16:24:21 -0800
parents 7ef00d09ef35
children 337d728e644f
files hgext/rebase.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):