rebase: always pass destination as revnum to _handleskippingobsolete()
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 28 Jun 2017 14:53:54 -0700
changeset 33157 5d29c55414b3
parent 33156 5ebf39ae10ed
child 33158 cb7140e230c8
rebase: always pass destination as revnum to _handleskippingobsolete() We were passing it as a revision number in one place and as a context in another. It worked because the only use was in "repo[dest].rev()", but it was confusing. By always passing a revision number, we can also remove that unnecessary lookup.
hgext/rebase.py
--- a/hgext/rebase.py	Thu Jun 29 23:04:47 2017 -0700
+++ b/hgext/rebase.py	Wed Jun 28 14:53:54 2017 -0700
@@ -317,7 +317,7 @@
                 hint=_('use --keep to keep original changesets'))
 
         obsrevs = _filterobsoleterevs(self.repo, set(rebaseset))
-        self._handleskippingobsolete(rebaseset, obsrevs, dest)
+        self._handleskippingobsolete(rebaseset, obsrevs, dest.rev())
 
         result = buildstate(self.repo, dest, rebaseset, self.collapsef,
                             self.obsoletenotrebased)
@@ -1464,7 +1464,7 @@
     if allsuccessors:
         # Look for successors of obsolete nodes to be rebased among
         # the ancestors of dest
-        ancs = cl.ancestors([repo[dest].rev()],
+        ancs = cl.ancestors([dest],
                             stoprev=min(allsuccessors),
                             inclusive=True)
         for s in allsuccessors: