Skip to content
Snippets Groups Projects
Commit 6a78715e authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

dirstate: add a `get_entry` method to the dirstate

This method give access to the underlying `DirstateEntry` object (or an empty
one if None was there). It should allow us to use the more semantic property of
the entry instead of the state where we needs it.

Differential Revision: https://phab.mercurial-scm.org/D11522
parent 596510cd
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment