# HG changeset patch # User Drew Gottlieb # Date 2015-03-13 22:25:01 # Node ID 149cc171e4a0621183cf72c1fa16b1ecf64ff48d # Parent 4c7c6beade1adec5925eb59b6a8dbcb8ae149394 manifest: add manifestdict.hasdir() method Allows for alternative implementations of manifestdict to decide if a directory exists in whatever way is most optimal. diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -155,6 +155,9 @@ class manifestdict(object): 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():