# HG changeset patch # User Pierre-Yves David # Date 2019-03-11 00:09:38 # Node ID 2930b31383af4e24a5afeacd67c5a213db46de4f # Parent ade02721d3fa29aa874b7de7e913bd811631ff25 hgtagsfnodescache: handle nullid lookup The null revision is empty, so it `.hgtags` content is `nullid` in regards with the `hgtagsfnodescache`. Dealing with `nullid` will help with the next changeset. Before this change, feeding `nullid` to `hgtagsfnodescache.getfnode` would return a wrong result (fnode for tip). diff --git a/mercurial/tags.py b/mercurial/tags.py --- a/mercurial/tags.py +++ b/mercurial/tags.py @@ -691,6 +691,9 @@ class hgtagsfnodescache(object): If an .hgtags does not exist at the specified revision, nullid is returned. """ + if node == nullid: + return nullid + ctx = self._repo[node] rev = ctx.rev()