Mercurial > hg-stable
changeset 32810:d4b5468719da
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 05 Jun 2017 15:20:20 +0100 |
parents | 443e8543a125 |
children | 1cb14923dee9 |
files | mercurial/discovery.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)