comparison mercurial/manifest.py @ 39517:8798be5f04fc

treemanifest: avoid unnecessary copies/processing when using alwaysmatcher Differential Revision: https://phab.mercurial-scm.org/D4368
author Kyle Lippincott <spectral@google.com>
date Thu, 23 Aug 2018 00:34:25 -0700
parents 079d7bfa463d
children c29548ba4a75
comparison
equal deleted inserted replaced
39516:079d7bfa463d 39517:8798be5f04fc
938 copy._copyfunc = self._copyfunc 938 copy._copyfunc = self._copyfunc
939 return copy 939 return copy
940 940
941 def filesnotin(self, m2, match=None): 941 def filesnotin(self, m2, match=None):
942 '''Set of files in this manifest that are not in the other''' 942 '''Set of files in this manifest that are not in the other'''
943 if match: 943 if match and not match.always():
944 m1 = self.matches(match) 944 m1 = self.matches(match)
945 m2 = m2.matches(match) 945 m2 = m2.matches(match)
946 return m1.filesnotin(m2) 946 return m1.filesnotin(m2)
947 947
948 files = set() 948 files = set()
1083 nodeid in the current/other manifest and fl1/fl2 is the flag 1083 nodeid in the current/other manifest and fl1/fl2 is the flag
1084 in the current/other manifest. Where the file does not exist, 1084 in the current/other manifest. Where the file does not exist,
1085 the nodeid will be None and the flags will be the empty 1085 the nodeid will be None and the flags will be the empty
1086 string. 1086 string.
1087 ''' 1087 '''
1088 if match: 1088 if match and not match.always():
1089 m1 = self.matches(match) 1089 m1 = self.matches(match)
1090 m2 = m2.matches(match) 1090 m2 = m2.matches(match)
1091 return m1.diff(m2, clean=clean) 1091 return m1.diff(m2, clean=clean)
1092 result = {} 1092 result = {}
1093 emptytree = treemanifest() 1093 emptytree = treemanifest()