changeset 31200:2f881e7d1ade

fileset: build initial subset in fullmatchctx class
author Yuya Nishihara <yuya@tcha.org>
date Sat, 24 Jan 2015 18:56:02 +0900
parents 3c32a3fdfd16
children 3c3ab84e6e78
files mercurial/fileset.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/fileset.py	Tue Mar 24 23:10:49 2015 +0900
+++ b/mercurial/fileset.py	Sat Jan 24 18:56:02 2015 +0900
@@ -474,7 +474,7 @@
 }
 
 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 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 @@
     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'))