##// END OF EJS Templates
manifest: simplify manifest.add() by making args required...
Augie Fackler -
r22787:4a13849c default
parent child Browse files
Show More
@@ -1415,7 +1415,7 b' class localrepository(object):'
1415 for f in drop:
1415 for f in drop:
1416 del m1[f]
1416 del m1[f]
1417 mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(),
1417 mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(),
1418 p2.manifestnode(), (new, drop))
1418 p2.manifestnode(), new, drop)
1419 files = changed + removed
1419 files = changed + removed
1420 else:
1420 else:
1421 mn = p1.manifestnode()
1421 mn = p1.manifestnode()
@@ -159,11 +159,10 b' class manifest(revlog.revlog):'
159 f, n = l.split('\0')
159 f, n = l.split('\0')
160 return revlog.bin(n[:40]), n[40:-1]
160 return revlog.bin(n[:40]), n[40:-1]
161
161
162 def add(self, map, transaction, link, p1=None, p2=None,
162 def add(self, map, transaction, link, p1, p2, added, removed):
163 changed=None):
164 # if we're using the cache, make sure it is valid and
163 # if we're using the cache, make sure it is valid and
165 # parented by the same node we're diffing against
164 # parented by the same node we're diffing against
166 if not (changed and p1 and (p1 in self._mancache)):
165 if not (p1 and (p1 in self._mancache)):
167 files = sorted(map)
166 files = sorted(map)
168 _checkforbidden(files)
167 _checkforbidden(files)
169
168
@@ -175,7 +174,6 b' class manifest(revlog.revlog):'
175 arraytext = array.array('c', text)
174 arraytext = array.array('c', text)
176 cachedelta = None
175 cachedelta = None
177 else:
176 else:
178 added, removed = changed
179 addlist = self._mancache[p1][1]
177 addlist = self._mancache[p1][1]
180
178
181 _checkforbidden(added)
179 _checkforbidden(added)
General Comments 0
You need to be logged in to leave comments. Login now