diff -r 596510cd2b12 -r 6a78715e56c8 mercurial/dirstate.py --- a/mercurial/dirstate.py Thu Sep 30 18:06:34 2021 +0200 +++ b/mercurial/dirstate.py Wed Sep 29 02:37:24 2021 +0200 @@ -332,6 +332,13 @@ return entry.state return b'?' + def get_entry(self, path): + """return a DirstateItem for the associated path""" + entry = self._map.get(path) + if entry is None: + return DirstateItem() + return entry + def __contains__(self, key): return key in self._map