diff mercurial/manifest.py @ 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 f263814c72ac
children 7002ad149f30
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():