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

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 3:59 p.m.
Message ID <de74145b8d92de7b07849e14c88a3169@localhost.localdomain>
Download mbox | patch
Permalink /patch/43087/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 3:59 p.m.
Closed by commit rHGdc675341462c: index: use `index.rev` in `exchange.fallbackheads` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7345?vs=17887&id=17899

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7345/new/

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

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS




To: marmoute, #hg-reviewers, indygreg
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(