Changeset View
Changeset View
Standalone View
Standalone View
mercurial/context.py
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Line(s) | def match(self, pats=None, include=None, exclude=None, default='glob', | ||||
listsubrepos=False, badfn=None): | listsubrepos=False, badfn=None): | ||||
r = self._repo | r = self._repo | ||||
return matchmod.match(r.root, r.getcwd(), pats, | return matchmod.match(r.root, r.getcwd(), pats, | ||||
include, exclude, default, | include, exclude, default, | ||||
auditor=r.nofsauditor, ctx=self, | auditor=r.nofsauditor, ctx=self, | ||||
listsubrepos=listsubrepos, badfn=badfn) | listsubrepos=listsubrepos, badfn=badfn) | ||||
def diff(self, ctx2=None, match=None, changes=None, opts=None, | def diff(self, ctx2=None, match=None, changes=None, opts=None, | ||||
losedatafn=None, prefix='', relroot='', copy=None, | losedatafn=None, pathfn=None, copy=None, | ||||
copysourcematch=None, hunksfilterfn=None): | copysourcematch=None, hunksfilterfn=None): | ||||
"""Returns a diff generator for the given contexts and matcher""" | """Returns a diff generator for the given contexts and matcher""" | ||||
if ctx2 is None: | if ctx2 is None: | ||||
ctx2 = self.p1() | ctx2 = self.p1() | ||||
if ctx2 is not None: | if ctx2 is not None: | ||||
ctx2 = self._repo[ctx2] | ctx2 = self._repo[ctx2] | ||||
return patch.diff(self._repo, ctx2, self, match=match, changes=changes, | return patch.diff(self._repo, ctx2, self, match=match, changes=changes, | ||||
opts=opts, losedatafn=losedatafn, prefix=prefix, | opts=opts, losedatafn=losedatafn, pathfn=pathfn, | ||||
relroot=relroot, copy=copy, | copy=copy, copysourcematch=copysourcematch, | ||||
copysourcematch=copysourcematch, | |||||
hunksfilterfn=hunksfilterfn) | hunksfilterfn=hunksfilterfn) | ||||
def dirs(self): | def dirs(self): | ||||
return self._manifest.dirs() | return self._manifest.dirs() | ||||
def hasdir(self, dir): | def hasdir(self, dir): | ||||
return self._manifest.hasdir(dir) | return self._manifest.hasdir(dir) | ||||
▲ Show 20 Lines • Show All 2171 Lines • Show Last 20 Lines |