Show More
@@ -928,12 +928,9 b' class forceincludematcher(object):' | |||
|
928 | 928 | def prefix(self): |
|
929 | 929 | return False |
|
930 | 930 | |
|
931 |
def |
|
|
932 | sha1 = hashlib.sha1() | |
|
933 | sha1.update(_hashmatcher(self._matcher)) | |
|
934 | for include in sorted(self._includes): | |
|
935 | sha1.update(include + '\0') | |
|
936 | return sha1.hexdigest() | |
|
931 | def __repr__(self): | |
|
932 | return ('<forceincludematcher matcher=%r, includes=%r>' % | |
|
933 | (self._matcher, sorted(self._includes))) | |
|
937 | 934 | |
|
938 | 935 | class unionmatcher(object): |
|
939 | 936 | """A matcher that is the union of several matchers.""" |
@@ -961,11 +958,8 b' class unionmatcher(object):' | |||
|
961 | 958 | def prefix(self): |
|
962 | 959 | return False |
|
963 | 960 | |
|
964 |
def |
|
|
965 | sha1 = hashlib.sha1() | |
|
966 | for m in self._matchers: | |
|
967 | sha1.update(_hashmatcher(m)) | |
|
968 | return sha1.hexdigest() | |
|
961 | def __repr__(self): | |
|
962 | return ('<unionmatcher matchers=%r>' % self._matchers) | |
|
969 | 963 | |
|
970 | 964 | class negatematcher(object): |
|
971 | 965 | def __init__(self, matcher): |
@@ -986,16 +980,10 b' class negatematcher(object):' | |||
|
986 | 980 | def anypats(self): |
|
987 | 981 | return True |
|
988 | 982 | |
|
989 |
def |
|
|
990 | sha1 = hashlib.sha1() | |
|
991 | sha1.update('negate') | |
|
992 | sha1.update(_hashmatcher(self._matcher)) | |
|
993 | return sha1.hexdigest() | |
|
983 | def __repr__(self): | |
|
984 | return ('<negatematcher matcher=%r>' % self._matcher) | |
|
994 | 985 | |
|
995 | 986 | def _hashmatcher(matcher): |
|
996 | if util.safehasattr(matcher, 'hash'): | |
|
997 | return matcher.hash() | |
|
998 | ||
|
999 | 987 | sha1 = hashlib.sha1() |
|
1000 | 988 | sha1.update(repr(matcher)) |
|
1001 | 989 | return sha1.hexdigest() |
General Comments 0
You need to be logged in to leave comments.
Login now