##// END OF EJS Templates
fileset: move copy constructor of matchctx near __init__
Yuya Nishihara -
r38917:dec16c0c default
parent child Browse files
Show More
@@ -462,6 +462,9 b' class matchctx(object):'
462 self._badfn = badfn
462 self._badfn = badfn
463 self._status = None
463 self._status = None
464
464
465 def switch(self, basectx, ctx):
466 return matchctx(basectx, ctx, self._badfn)
467
465 def withstatus(self, keys):
468 def withstatus(self, keys):
466 """Create matchctx which has precomputed status specified by the keys"""
469 """Create matchctx which has precomputed status specified by the keys"""
467 mctx = matchctx(self._basectx, self.ctx, self._badfn)
470 mctx = matchctx(self._basectx, self.ctx, self._badfn)
@@ -528,9 +531,6 b' class matchctx(object):'
528 return matchmod.nevermatcher(repo.root, repo.getcwd(),
531 return matchmod.nevermatcher(repo.root, repo.getcwd(),
529 badfn=self._badfn)
532 badfn=self._badfn)
530
533
531 def switch(self, basectx, ctx):
532 return matchctx(basectx, ctx, self._badfn)
533
534 def match(ctx, expr, badfn=None):
534 def match(ctx, expr, badfn=None):
535 """Create a matcher for a single fileset expression"""
535 """Create a matcher for a single fileset expression"""
536 tree = filesetlang.parse(expr)
536 tree = filesetlang.parse(expr)
General Comments 0
You need to be logged in to leave comments. Login now