# HG changeset patch # User Pierre-Yves David # Date 2017-06-05 14:20:20 # Node ID d4b5468719da6b847fec3a9ace9744d12403e2de # Parent 443e8543a1252d967991b82cbd36dc5c625472b9 checkheads: use 'nodemap.get' to convert nodes to revs We are about to call 'torev' on node that might be locally missing. In this case, 'nodemap.revs' will return None (something valid in our usecase) while 'changelog.rev' would raise an exception. We make this change in a distinct changeset to show it does not impact the tests. diff --git a/mercurial/discovery.py b/mercurial/discovery.py --- a/mercurial/discovery.py +++ b/mercurial/discovery.py @@ -439,7 +439,7 @@ def _postprocessobsolete(pushop, futurec repo = pushop.repo unfi = repo.unfiltered() tonode = unfi.changelog.node - torev = unfi.changelog.rev + torev = unfi.changelog.nodemap.get public = phases.public getphase = unfi._phasecache.phase ispublic = (lambda r: getphase(unfi, r) == public)