D7345: index: use `index.rev` in `exchange.fallbackheads`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Nov 8 16:26:38 UTC 2019


marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7345

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -528,8 +528,8 @@
         # We can pick:
         # * missingheads part of common (::commonheads)
         common = self.outgoing.common
-        nm = self.repo.changelog.nodemap
-        cheads = [node for node in self.revs if nm[node] in common]
+        rev = self.repo.changelog.index.rev
+        cheads = [node for node in self.revs if rev(node) in common]
         # and
         # * commonheads parents on missing
         revset = unfi.set(



To: marmoute, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list