Patchwork [9,of,9] fileset: remove fullmatchctx class

login
register
mail settings
Submitter Yuya Nishihara
Date July 10, 2018, 3:07 p.m.
Message ID <89e05df138ac4e056bfd.1531235267@mimosa>
Download mbox | patch
Permalink /patch/32766/
State Accepted
Headers show

Comments

Yuya Nishihara - July 10, 2018, 3:07 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1528551509 -32400
#      Sat Jun 09 22:38:29 2018 +0900
# Node ID 89e05df138ac4e056bfd2c748b2f4554df1359b3
# Parent  87bb964e745e47fc897f56864b66e9a8e986301d
fileset: remove fullmatchctx class

It's exactly the same as matchctx.
via Mercurial-devel - July 16, 2018, 6:39 a.m.
On Tue, Jul 10, 2018 at 8:08 AM Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1528551509 -32400
> #      Sat Jun 09 22:38:29 2018 +0900
> # Node ID 89e05df138ac4e056bfd2c748b2f4554df1359b3
> # Parent  87bb964e745e47fc897f56864b66e9a8e986301d
> fileset: remove fullmatchctx class
>

Nice! Queued, thanks.

Patch

diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -613,14 +613,6 @@  class matchctx(object):
     def switch(self, ctx, status=None):
         return matchctx(ctx, status, self._badfn)
 
-class fullmatchctx(matchctx):
-    """A match context where any files in any revisions should be valid"""
-
-    def __init__(self, ctx, status=None, badfn=None):
-        super(fullmatchctx, self).__init__(ctx, status, badfn)
-    def switch(self, ctx, status=None):
-        return fullmatchctx(ctx, status, self._badfn)
-
 # filesets using matchctx.switch()
 _switchcallers = [
     'revs',
@@ -643,7 +635,7 @@  def _intree(funcs, tree):
 def match(ctx, expr, badfn=None):
     """Create a matcher for a single fileset expression"""
     tree = parse(expr)
-    mctx = fullmatchctx(ctx, _buildstatus(ctx, tree), badfn=badfn)
+    mctx = matchctx(ctx, _buildstatus(ctx, tree), badfn=badfn)
     return getmatch(mctx, tree)
 
 def _buildstatus(ctx, tree, basectx=None):