comparison mercurial/context.py @ 19565:bd1580a9c133

basectx: move _dirs from changectx
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 05 Aug 2013 18:41:43 -0500
parents f0ed47b73d37
children 54817c774d38
comparison
equal deleted inserted replaced
19564:f0ed47b73d37 19565:bd1580a9c133
135 if ctx2 is not None and not isinstance(ctx2, changectx): 135 if ctx2 is not None and not isinstance(ctx2, changectx):
136 ctx2 = self._repo[ctx2] 136 ctx2 = self._repo[ctx2]
137 diffopts = patch.diffopts(self._repo.ui, opts) 137 diffopts = patch.diffopts(self._repo.ui, opts)
138 return patch.diff(self._repo, ctx2.node(), self.node(), 138 return patch.diff(self._repo, ctx2.node(), self.node(),
139 match=match, opts=diffopts) 139 match=match, opts=diffopts)
140
141 @propertycache
142 def _dirs(self):
143 return scmutil.dirs(self._manifest)
140 144
141 class changectx(basectx): 145 class changectx(basectx):
142 """A changecontext object makes access to data related to a particular 146 """A changecontext object makes access to data related to a particular
143 changeset convenient. It represents a read-only context already presnt in 147 changeset convenient. It represents a read-only context already presnt in
144 the repo.""" 148 the repo."""
396 if fn in self._dirs: 400 if fn in self._dirs:
397 # specified pattern is a directory 401 # specified pattern is a directory
398 continue 402 continue
399 if match.bad(fn, _('no such file in rev %s') % self) and match(fn): 403 if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
400 yield fn 404 yield fn
401
402 @propertycache
403 def _dirs(self):
404 return scmutil.dirs(self._manifest)
405 405
406 def dirs(self): 406 def dirs(self):
407 return self._dirs 407 return self._dirs
408 408
409 def dirty(self): 409 def dirty(self):