Comments
Patch
@@ -120,10 +120,16 @@
return ''
def sub(self, path):
return subrepo.subrepo(self, path)
+ def match(self, pats=[], include=None, exclude=None, default='glob'):
+ r = self._repo
+ return matchmod.match(r.root, r.getcwd(), pats,
+ include, exclude, default,
+ auditor=r.auditor, ctx=self)
+
class changectx(context):
"""A changecontext object makes access to data related to a particular
changeset convenient. It represents a read-only context already presnt in
the repo."""
def __init__(self, repo, changeid=''):
@@ -381,16 +387,10 @@
# specified pattern is a directory
continue
if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
yield fn
- def match(self, pats=[], include=None, exclude=None, default='glob'):
- r = self._repo
- return matchmod.match(r.root, r.getcwd(), pats,
- include, exclude, default,
- auditor=r.auditor, ctx=self)
-
def diff(self, ctx2=None, match=None, **opts):
"""Returns a diff generator for the given contexts and matcher"""
if ctx2 is None:
ctx2 = self.p1()
if ctx2 is not None and not isinstance(ctx2, changectx):