##// END OF EJS Templates
manifest: make manifestctx store the repo...
Durham Goode -
r30220:acc8885a stable
parent child Browse files
Show More
@@ -1276,7 +1276,7 b' class manifestlog(object):'
1276 1276 if self._treeinmem:
1277 1277 m = treemanifestctx(self._revlog, '', node)
1278 1278 else:
1279 m = manifestctx(self._revlog, node)
1279 m = manifestctx(self._repo, node)
1280 1280 if node != revlog.nullid:
1281 1281 self._mancache[node] = m
1282 1282 return m
@@ -1288,8 +1288,8 b' class manifestctx(object):'
1288 1288 """A class representing a single revision of a manifest, including its
1289 1289 contents, its parent revs, and its linkrev.
1290 1290 """
1291 def __init__(self, revlog, node):
1292 self._revlog = revlog
1291 def __init__(self, repo, node):
1292 self._repo = repo
1293 1293 self._data = None
1294 1294
1295 1295 self._node = node
@@ -1309,14 +1309,15 b' class manifestctx(object):'
1309 1309 if self._node == revlog.nullid:
1310 1310 self._data = manifestdict()
1311 1311 else:
1312 text = self._revlog.revision(self._node)
1312 rl = self._repo.manifestlog._revlog
1313 text = rl.revision(self._node)
1313 1314 arraytext = array.array('c', text)
1314 self._revlog._fulltextcache[self._node] = arraytext
1315 rl._fulltextcache[self._node] = arraytext
1315 1316 self._data = manifestdict(text)
1316 1317 return self._data
1317 1318
1318 1319 def readfast(self):
1319 rl = self._revlog
1320 rl = self._repo.manifestlog._revlog
1320 1321 r = rl.rev(self._node)
1321 1322 deltaparent = rl.deltaparent(r)
1322 1323 if deltaparent != revlog.nullrev and deltaparent in rl.parentrevs(r):
@@ -1324,11 +1325,11 b' class manifestctx(object):'
1324 1325 return self.read()
1325 1326
1326 1327 def readdelta(self):
1327 revlog = self._revlog
1328 revlog = self._repo.manifestlog._revlog
1328 1329 if revlog._usemanifestv2:
1329 1330 # Need to perform a slow delta
1330 1331 r0 = revlog.deltaparent(revlog.rev(self._node))
1331 m0 = manifestctx(revlog, revlog.node(r0)).read()
1332 m0 = manifestctx(self._repo, revlog.node(r0)).read()
1332 1333 m1 = self.read()
1333 1334 md = manifestdict()
1334 1335 for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).iteritems():
General Comments 0
You need to be logged in to leave comments. Login now