comparison 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
comparison
equal deleted inserted replaced
24323:4c7c6beade1a 24324:149cc171e4a0
152 def _dirs(self): 152 def _dirs(self):
153 return scmutil.dirs(self) 153 return scmutil.dirs(self)
154 154
155 def dirs(self): 155 def dirs(self):
156 return self._dirs 156 return self._dirs
157
158 def hasdir(self, dir):
159 return dir in self._dirs
157 160
158 def matches(self, match): 161 def matches(self, match):
159 '''generate a new manifest filtered by the match argument''' 162 '''generate a new manifest filtered by the match argument'''
160 if match.always(): 163 if match.always():
161 return self.copy() 164 return self.copy()