Mercurial > hg
comparison mercurial/context.py @ 14674:1c151b963254
match: allow passing a context object to match core
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 18 Jun 2011 16:52:51 -0500 |
parents | 2d2604adfdd6 |
children | cf5f9df6406b |
comparison
equal
deleted
inserted
replaced
14673:b0566467c492 | 14674:1c151b963254 |
---|---|
210 return subrepo.subrepo(self, path) | 210 return subrepo.subrepo(self, path) |
211 | 211 |
212 def match(self, pats=[], include=None, exclude=None, default='glob'): | 212 def match(self, pats=[], include=None, exclude=None, default='glob'): |
213 r = self._repo | 213 r = self._repo |
214 return matchmod.match(r.root, r.getcwd(), pats, | 214 return matchmod.match(r.root, r.getcwd(), pats, |
215 include, exclude, default, auditor=r.auditor) | 215 include, exclude, default, |
216 auditor=r.auditor, ctx=self) | |
216 | 217 |
217 def diff(self, ctx2=None, match=None, **opts): | 218 def diff(self, ctx2=None, match=None, **opts): |
218 """Returns a diff generator for the given contexts and matcher""" | 219 """Returns a diff generator for the given contexts and matcher""" |
219 if ctx2 is None: | 220 if ctx2 is None: |
220 ctx2 = self.p1() | 221 ctx2 = self.p1() |