##// END OF EJS Templates
manifest: rename 'mf', 'map', and 'mapping' to 'm'...
Martin von Zweigbergk -
r24147:ba4fcd80 default
parent child Browse files
Show More
@@ -48,11 +48,11 b' class manifestdict(dict):'
48 48 (not match.anypats() and util.all(fn in self for fn in files))):
49 49 return self.intersectfiles(files)
50 50
51 mf = self.copy()
52 for fn in mf.keys():
51 m = self.copy()
52 for fn in m.keys():
53 53 if not match(fn):
54 del mf[fn]
55 return mf
54 del m[fn]
55 return m
56 56
57 57 def diff(self, m2, clean=False):
58 58 '''Finds changes between the current manifest and m2.
@@ -247,16 +247,16 b' class manifest(revlog.revlog):'
247 247 return self._mancache[node][0]
248 248 text = self.revision(node)
249 249 arraytext = array.array('c', text)
250 mapping = _parse(text)
251 self._mancache[node] = (mapping, arraytext)
252 return mapping
250 m = _parse(text)
251 self._mancache[node] = (m, arraytext)
252 return m
253 253
254 254 def find(self, node, f):
255 255 '''look up entry for a single file efficiently.
256 256 return (node, flags) pair if found, (None, None) if not.'''
257 257 if node in self._mancache:
258 mapping = self._mancache[node][0]
259 return mapping.get(f), mapping.flags(f)
258 m = self._mancache[node][0]
259 return m.get(f), m.flags(f)
260 260 text = self.revision(node)
261 261 start, end = _msearch(text, f)
262 262 if start == end:
@@ -265,7 +265,7 b' class manifest(revlog.revlog):'
265 265 f, n = l.split('\0')
266 266 return revlog.bin(n[:40]), n[40:-1]
267 267
268 def add(self, map, transaction, link, p1, p2, added, removed):
268 def add(self, m, transaction, link, p1, p2, added, removed):
269 269 if p1 in self._mancache:
270 270 # If our first parent is in the manifest cache, we can
271 271 # compute a delta here using properties we know about the
@@ -280,7 +280,7 b' class manifest(revlog.revlog):'
280 280 # since the lists are already sorted
281 281 work.sort()
282 282
283 arraytext, deltatext = map.fastdelta(self._mancache[p1][1], work)
283 arraytext, deltatext = m.fastdelta(self._mancache[p1][1], work)
284 284 cachedelta = self.rev(p1), deltatext
285 285 text = util.buffer(arraytext)
286 286 else:
@@ -288,11 +288,11 b' class manifest(revlog.revlog):'
288 288 # just encode a fulltext of the manifest and pass that
289 289 # through to the revlog layer, and let it handle the delta
290 290 # process.
291 text = map.text()
291 text = m.text()
292 292 arraytext = array.array('c', text)
293 293 cachedelta = None
294 294
295 295 n = self.addrevision(text, transaction, link, p1, p2, cachedelta)
296 self._mancache[n] = (map, arraytext)
296 self._mancache[n] = (m, arraytext)
297 297
298 298 return n
General Comments 0
You need to be logged in to leave comments. Login now