[PATCH 3 of 8 V2] fileset: build initial subset in fullmatchctx class
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Mar 6 04:36:50 EST 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1422093362 -32400
# Sat Jan 24 18:56:02 2015 +0900
# Node ID dcafd00afeb38478ea65a978b9ada91b4a6ac46b
# Parent 54b8e49c33610b648cff5cbee2c0b306c63a1ebd
# EXP-Topic filesetrev-func
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
# hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r dcafd00afeb3
fileset: build initial subset in fullmatchctx class
diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -474,7 +474,7 @@ methods = {
}
class matchctx(object):
- def __init__(self, ctx, subset=None, status=None):
+ def __init__(self, ctx, subset, status=None):
self.ctx = ctx
self.subset = subset
self._status = status
@@ -501,7 +501,8 @@ class matchctx(object):
class fullmatchctx(matchctx):
"""A match context where any files in any revisions should be valid"""
- def __init__(self, ctx, subset=None, status=None):
+ def __init__(self, ctx, status=None):
+ subset = _buildsubset(ctx, status)
super(fullmatchctx, self).__init__(ctx, subset, status)
def _intree(funcs, tree):
@@ -540,8 +541,7 @@ def getfileset(ctx, expr):
else:
status = None
- subset = _buildsubset(ctx, status)
- return getset(fullmatchctx(ctx, subset, status), tree)
+ return getset(fullmatchctx(ctx, status), tree)
def prettyformat(tree):
return parser.prettyformat(tree, ('string', 'symbol'))
More information about the Mercurial-devel
mailing list