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.
--- a/mercurial/discovery.py Mon Jun 05 15:17:47 2017 +0100
+++ b/mercurial/discovery.py Mon Jun 05 15:20:20 2017 +0100
@@ -439,7 +439,7 @@
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)