changeset 24325:79d9c51488ca

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.
author Drew Gottlieb <drgott@google.com>
date Fri, 13 Mar 2015 15:32:45 -0700
parents 149cc171e4a0
children 637da5711122
files mercurial/context.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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