manifest: add hasdir() to context
authorDrew Gottlieb <drgott@google.com>
Fri, 13 Mar 2015 15:32:45 -0700
changeset 24325 79d9c51488ca
parent 24324 149cc171e4a0
child 24326 637da5711122
manifest: add hasdir() to context This is a convenience method that calls to its manifest's hasdir(). There are parts of context that check to see if a directory exists, and this method will let implementations of manifest provide an optimal way to find a particular directory.
mercurial/context.py
--- a/mercurial/context.py	Fri Mar 13 15:25:01 2015 -0700
+++ b/mercurial/context.py	Fri Mar 13 15:32:45 2015 -0700
@@ -269,6 +269,8 @@
     def dirs(self):
         return self._manifest.dirs()
 
+    def hasdir(self, dir):
+        return self._manifest.hasdir(dir)
 
     def dirty(self, missing=False, merge=True, branch=True):
         return False