changeset 24324:149cc171e4a0

manifest: add manifestdict.hasdir() method Allows for alternative implementations of manifestdict to decide if a directory exists in whatever way is most optimal.
author Drew Gottlieb <drgott@google.com>
date Fri, 13 Mar 2015 15:25:01 -0700
parents 4c7c6beade1a
children 79d9c51488ca
files mercurial/manifest.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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():