diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
index 596510cd2b1200adbc5843f6caee2bb8a32fb8cf_bWVyY3VyaWFsL2RpcnN0YXRlLnB5..6a78715e56c85c12ba8423de95c2639c0d7df7f3_bWVyY3VyaWFsL2RpcnN0YXRlLnB5 100644
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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