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

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 4:26 p.m.
Message ID <differential-rev-PHID-DREV-kh6q2abv5ol4zkec7lza-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42951/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2019, 4:26 p.m.
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




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

Patch

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(