##// END OF EJS Templates
match: remove explicitdir attribute...
Martin von Zweigbergk -
r44114:5e1b0470 default
parent child Browse files
Show More
@@ -375,10 +375,6 b' class basematcher(object):'
375 '''Callback from dirstate.walk for each explicit file that can't be
375 '''Callback from dirstate.walk for each explicit file that can't be
376 found/accessed, with an error message.'''
376 found/accessed, with an error message.'''
377
377
378 # If an explicitdir is set, it will be called when an explicitly listed
379 # directory is visited.
380 explicitdir = None
381
382 # If an traversedir is set, it will be called when a directory discovered
378 # If an traversedir is set, it will be called when a directory discovered
383 # by recursive traversal is visited.
379 # by recursive traversal is visited.
384 traversedir = None
380 traversedir = None
@@ -792,8 +788,7 b' class differencematcher(basematcher):'
792 '''Composes two matchers by matching if the first matches and the second
788 '''Composes two matchers by matching if the first matches and the second
793 does not.
789 does not.
794
790
795 The second matcher's non-matching-attributes (bad, explicitdir,
791 The second matcher's non-matching-attributes (bad, traversedir) are ignored.
796 traversedir) are ignored.
797 '''
792 '''
798
793
799 def __init__(self, m1, m2):
794 def __init__(self, m1, m2):
@@ -801,7 +796,6 b' class differencematcher(basematcher):'
801 self._m1 = m1
796 self._m1 = m1
802 self._m2 = m2
797 self._m2 = m2
803 self.bad = m1.bad
798 self.bad = m1.bad
804 self.explicitdir = m1.explicitdir
805 self.traversedir = m1.traversedir
799 self.traversedir = m1.traversedir
806
800
807 def matchfn(self, f):
801 def matchfn(self, f):
@@ -862,8 +856,7 b' class differencematcher(basematcher):'
862 def intersectmatchers(m1, m2):
856 def intersectmatchers(m1, m2):
863 '''Composes two matchers by matching if both of them match.
857 '''Composes two matchers by matching if both of them match.
864
858
865 The second matcher's non-matching-attributes (bad, explicitdir,
859 The second matcher's non-matching-attributes (bad, traversedir) are ignored.
866 traversedir) are ignored.
867 '''
860 '''
868 if m1 is None or m2 is None:
861 if m1 is None or m2 is None:
869 return m1 or m2
862 return m1 or m2
@@ -872,7 +865,6 b' def intersectmatchers(m1, m2):'
872 # TODO: Consider encapsulating these things in a class so there's only
865 # TODO: Consider encapsulating these things in a class so there's only
873 # one thing to copy from m1.
866 # one thing to copy from m1.
874 m.bad = m1.bad
867 m.bad = m1.bad
875 m.explicitdir = m1.explicitdir
876 m.traversedir = m1.traversedir
868 m.traversedir = m1.traversedir
877 return m
869 return m
878 if m2.always():
870 if m2.always():
@@ -887,7 +879,6 b' class intersectionmatcher(basematcher):'
887 self._m1 = m1
879 self._m1 = m1
888 self._m2 = m2
880 self._m2 = m2
889 self.bad = m1.bad
881 self.bad = m1.bad
890 self.explicitdir = m1.explicitdir
891 self.traversedir = m1.traversedir
882 self.traversedir = m1.traversedir
892
883
893 @propertycache
884 @propertycache
@@ -1028,8 +1019,7 b' class subdirmatcher(basematcher):'
1028 class prefixdirmatcher(basematcher):
1019 class prefixdirmatcher(basematcher):
1029 """Adapt a matcher to work on a parent directory.
1020 """Adapt a matcher to work on a parent directory.
1030
1021
1031 The matcher's non-matching-attributes (bad, explicitdir, traversedir) are
1022 The matcher's non-matching-attributes (bad, traversedir) are ignored.
1032 ignored.
1033
1023
1034 The prefix path should usually be the relative path from the root of
1024 The prefix path should usually be the relative path from the root of
1035 this matcher to the root of the wrapped matcher.
1025 this matcher to the root of the wrapped matcher.
@@ -1112,14 +1102,13 b' class prefixdirmatcher(basematcher):'
1112 class unionmatcher(basematcher):
1102 class unionmatcher(basematcher):
1113 """A matcher that is the union of several matchers.
1103 """A matcher that is the union of several matchers.
1114
1104
1115 The non-matching-attributes (bad, explicitdir, traversedir) are taken from
1105 The non-matching-attributes (bad, traversedir) are taken from the first
1116 the first matcher.
1106 matcher.
1117 """
1107 """
1118
1108
1119 def __init__(self, matchers):
1109 def __init__(self, matchers):
1120 m1 = matchers[0]
1110 m1 = matchers[0]
1121 super(unionmatcher, self).__init__()
1111 super(unionmatcher, self).__init__()
1122 self.explicitdir = m1.explicitdir
1123 self.traversedir = m1.traversedir
1112 self.traversedir = m1.traversedir
1124 self._matchers = matchers
1113 self._matchers = matchers
1125
1114
General Comments 0
You need to be logged in to leave comments. Login now