Show More
@@ -1276,7 +1276,7 b' class manifestlog(object):' | |||||
1276 | if self._treeinmem: |
|
1276 | if self._treeinmem: | |
1277 | m = treemanifestctx(self._revlog, '', node) |
|
1277 | m = treemanifestctx(self._revlog, '', node) | |
1278 | else: |
|
1278 | else: | |
1279 |
m = manifestctx(self._re |
|
1279 | m = manifestctx(self._repo, node) | |
1280 | if node != revlog.nullid: |
|
1280 | if node != revlog.nullid: | |
1281 | self._mancache[node] = m |
|
1281 | self._mancache[node] = m | |
1282 | return m |
|
1282 | return m | |
@@ -1288,8 +1288,8 b' class manifestctx(object):' | |||||
1288 | """A class representing a single revision of a manifest, including its |
|
1288 | """A class representing a single revision of a manifest, including its | |
1289 | contents, its parent revs, and its linkrev. |
|
1289 | contents, its parent revs, and its linkrev. | |
1290 | """ |
|
1290 | """ | |
1291 |
def __init__(self, re |
|
1291 | def __init__(self, repo, node): | |
1292 |
self._re |
|
1292 | self._repo = repo | |
1293 | self._data = None |
|
1293 | self._data = None | |
1294 |
|
1294 | |||
1295 | self._node = node |
|
1295 | self._node = node | |
@@ -1309,14 +1309,15 b' class manifestctx(object):' | |||||
1309 | if self._node == revlog.nullid: |
|
1309 | if self._node == revlog.nullid: | |
1310 | self._data = manifestdict() |
|
1310 | self._data = manifestdict() | |
1311 | else: |
|
1311 | else: | |
1312 | text = self._revlog.revision(self._node) |
|
1312 | rl = self._repo.manifestlog._revlog | |
|
1313 | text = rl.revision(self._node) | |||
1313 | arraytext = array.array('c', text) |
|
1314 | arraytext = array.array('c', text) | |
1314 |
|
|
1315 | rl._fulltextcache[self._node] = arraytext | |
1315 | self._data = manifestdict(text) |
|
1316 | self._data = manifestdict(text) | |
1316 | return self._data |
|
1317 | return self._data | |
1317 |
|
1318 | |||
1318 | def readfast(self): |
|
1319 | def readfast(self): | |
1319 | rl = self._revlog |
|
1320 | rl = self._repo.manifestlog._revlog | |
1320 | r = rl.rev(self._node) |
|
1321 | r = rl.rev(self._node) | |
1321 | deltaparent = rl.deltaparent(r) |
|
1322 | deltaparent = rl.deltaparent(r) | |
1322 | if deltaparent != revlog.nullrev and deltaparent in rl.parentrevs(r): |
|
1323 | if deltaparent != revlog.nullrev and deltaparent in rl.parentrevs(r): | |
@@ -1324,11 +1325,11 b' class manifestctx(object):' | |||||
1324 | return self.read() |
|
1325 | return self.read() | |
1325 |
|
1326 | |||
1326 | def readdelta(self): |
|
1327 | def readdelta(self): | |
1327 | revlog = self._revlog |
|
1328 | revlog = self._repo.manifestlog._revlog | |
1328 | if revlog._usemanifestv2: |
|
1329 | if revlog._usemanifestv2: | |
1329 | # Need to perform a slow delta |
|
1330 | # Need to perform a slow delta | |
1330 | r0 = revlog.deltaparent(revlog.rev(self._node)) |
|
1331 | r0 = revlog.deltaparent(revlog.rev(self._node)) | |
1331 |
m0 = manifestctx( |
|
1332 | m0 = manifestctx(self._repo, revlog.node(r0)).read() | |
1332 | m1 = self.read() |
|
1333 | m1 = self.read() | |
1333 | md = manifestdict() |
|
1334 | md = manifestdict() | |
1334 | for f, ((n0, fl0), (n1, fl1)) in m0.diff(m1).iteritems(): |
|
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