manifest: add manifestdict.hasdir() method
authorDrew Gottlieb <drgott@google.com>
Fri, 13 Mar 2015 15:25:01 -0700
changeset 24324 149cc171e4a0
parent 24323 4c7c6beade1a
child 24325 79d9c51488ca
manifest: add manifestdict.hasdir() method Allows for alternative implementations of manifestdict to decide if a directory exists in whatever way is most optimal.
mercurial/manifest.py
--- a/mercurial/manifest.py	Fri Mar 13 15:23:02 2015 -0700
+++ b/mercurial/manifest.py	Fri Mar 13 15:25:01 2015 -0700
@@ -155,6 +155,9 @@
     def dirs(self):
         return self._dirs
 
+    def hasdir(self, dir):
+        return dir in self._dirs
+
     def matches(self, match):
         '''generate a new manifest filtered by the match argument'''
         if match.always():