Comments
Patch
@@ -62,12 +62,17 @@
self._files = []
self._anypats = bool(include or exclude)
self._ctx = ctx
+ self._pats = []
+ self._includepats = []
+ self._excludepats = []
if include:
pats = _normalize(include, 'glob', root, cwd, auditor)
+ self._includepats = pats
self.includepat, im = _buildmatch(ctx, pats, '(?:/|$)')
if exclude:
pats = _normalize(exclude, 'glob', root, cwd, auditor)
+ self._excludepats = pats
self.excludepat, em = _buildmatch(ctx, pats, '(?:/|$)')
if exact:
if isinstance(patterns, list):
@@ -75,8 +80,10 @@
else:
self._files = list(patterns)
pm = self.exact
+ self._pats = [('path', fn) for fn in self._files]
elif patterns:
pats = _normalize(patterns, default, root, cwd, auditor)
+ self._pats = pats
self._files = _roots(pats)
self._anypats = self._anypats or _anypats(pats)
self.patternspat, pm = _buildmatch(ctx, pats, '$')
@@ -311,6 +318,8 @@
pats = []
for kind, name in [_patsplit(p, default) for p in names]:
if kind in ('glob', 'relpath'):
+ if kind == 'relpath':
+ kind = 'path'
name = scmutil.canonpath(root, cwd, name, auditor)
elif kind in ('relglob', 'path'):
name = util.normpath(name)