Mercurial > hg
changeset 43544:886ec3962c66
index: use `index.has_node` in `bookmarks.bmstore`
Differential Revision: https://phab.mercurial-scm.org/D7344
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 08 Nov 2019 13:36:02 +0100 |
parents | 2c3afd083e45 |
children | 9c1f4e2f1fc4 |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Fri Nov 08 11:44:23 2019 +0100 +++ b/mercurial/bookmarks.py Fri Nov 08 13:36:02 2019 +0100 @@ -78,7 +78,7 @@ self._nodemap = nodemap = {} # node: sorted([refspec, ...]) self._clean = True self._aclean = True - nm = repo.changelog.nodemap + has_node = repo.changelog.index.has_node tonode = bin # force local lookup try: with _getbkfile(repo) as bkfile: @@ -89,7 +89,7 @@ try: sha, refspec = line.split(b' ', 1) node = tonode(sha) - if node in nm: + if has_node(node): refspec = encoding.tolocal(refspec) refmap[refspec] = node nrefs = nodemap.get(node)