Show More
@@ -677,7 +677,8 b' class cg1packer(object):' | |||||
677 | def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, mfs, |
|
677 | def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, mfs, | |
678 | fnodes): |
|
678 | fnodes): | |
679 | repo = self._repo |
|
679 | repo = self._repo | |
680 |
|
|
680 | mfl = repo.manifestlog | |
|
681 | dirlog = mfl._revlog.dirlog | |||
681 | tmfnodes = {'': mfs} |
|
682 | tmfnodes = {'': mfs} | |
682 |
|
683 | |||
683 | # Callback for the manifest, used to collect linkrevs for filelog |
|
684 | # Callback for the manifest, used to collect linkrevs for filelog | |
@@ -705,7 +706,7 b' class cg1packer(object):' | |||||
705 | treemanifests to send. |
|
706 | treemanifests to send. | |
706 | """ |
|
707 | """ | |
707 | clnode = tmfnodes[dir][x] |
|
708 | clnode = tmfnodes[dir][x] | |
708 |
mdata = |
|
709 | mdata = mfl.get(dir, x).readfast(shallow=True) | |
709 | for p, n, fl in mdata.iterentries(): |
|
710 | for p, n, fl in mdata.iterentries(): | |
710 | if fl == 't': # subdirectory manifest |
|
711 | if fl == 't': # subdirectory manifest | |
711 | subdir = dir + p + '/' |
|
712 | subdir = dir + p + '/' |
@@ -1351,6 +1351,12 b' class manifestctx(object):' | |||||
1351 | return self._data |
|
1351 | return self._data | |
1352 |
|
1352 | |||
1353 | def readfast(self, shallow=False): |
|
1353 | def readfast(self, shallow=False): | |
|
1354 | '''Calls either readdelta or read, based on which would be less work. | |||
|
1355 | readdelta is called if the delta is against the p1, and therefore can be | |||
|
1356 | read quickly. | |||
|
1357 | ||||
|
1358 | If `shallow` is True, nothing changes since this is a flat manifest. | |||
|
1359 | ''' | |||
1354 | rl = self._repo.manifestlog._revlog |
|
1360 | rl = self._repo.manifestlog._revlog | |
1355 | r = rl.rev(self._node) |
|
1361 | r = rl.rev(self._node) | |
1356 | deltaparent = rl.deltaparent(r) |
|
1362 | deltaparent = rl.deltaparent(r) | |
@@ -1440,6 +1446,13 b' class treemanifestctx(object):' | |||||
1440 | return md |
|
1446 | return md | |
1441 |
|
1447 | |||
1442 | def readfast(self, shallow=False): |
|
1448 | def readfast(self, shallow=False): | |
|
1449 | '''Calls either readdelta or read, based on which would be less work. | |||
|
1450 | readdelta is called if the delta is against the p1, and therefore can be | |||
|
1451 | read quickly. | |||
|
1452 | ||||
|
1453 | If `shallow` is True, it only returns the entries from this manifest, | |||
|
1454 | and not any submanifests. | |||
|
1455 | ''' | |||
1443 | rl = self._revlog() |
|
1456 | rl = self._revlog() | |
1444 | r = rl.rev(self._node) |
|
1457 | r = rl.rev(self._node) | |
1445 | deltaparent = rl.deltaparent(r) |
|
1458 | deltaparent = rl.deltaparent(r) | |
@@ -1522,15 +1535,6 b' class manifest(manifestrevlog):' | |||||
1522 | d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r)) |
|
1535 | d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r)) | |
1523 | return manifestdict(d) |
|
1536 | return manifestdict(d) | |
1524 |
|
1537 | |||
1525 | def readshallowfast(self, node): |
|
|||
1526 | '''like readfast(), but calls readshallowdelta() instead of readdelta() |
|
|||
1527 | ''' |
|
|||
1528 | r = self.rev(node) |
|
|||
1529 | deltaparent = self.deltaparent(r) |
|
|||
1530 | if deltaparent != revlog.nullrev and deltaparent in self.parentrevs(r): |
|
|||
1531 | return self.readshallowdelta(node) |
|
|||
1532 | return self.readshallow(node) |
|
|||
1533 |
|
||||
1534 | def read(self, node): |
|
1538 | def read(self, node): | |
1535 | if node == revlog.nullid: |
|
1539 | if node == revlog.nullid: | |
1536 | return self._newmanifest() # don't upset local cache |
|
1540 | return self._newmanifest() # don't upset local cache | |
@@ -1558,13 +1562,6 b' class manifest(manifestrevlog):' | |||||
1558 | self.fulltextcache[node] = arraytext |
|
1562 | self.fulltextcache[node] = arraytext | |
1559 | return m |
|
1563 | return m | |
1560 |
|
1564 | |||
1561 | def readshallow(self, node): |
|
|||
1562 | '''Reads the manifest in this directory. When using flat manifests, |
|
|||
1563 | this manifest will generally have files in subdirectories in it. Does |
|
|||
1564 | not cache the manifest as the callers generally do not read the same |
|
|||
1565 | version twice.''' |
|
|||
1566 | return manifestdict(self.revision(node)) |
|
|||
1567 |
|
||||
1568 | def find(self, node, f): |
|
1565 | def find(self, node, f): | |
1569 | '''look up entry for a single file efficiently. |
|
1566 | '''look up entry for a single file efficiently. | |
1570 | return (node, flags) pair if found, (None, None) if not.''' |
|
1567 | return (node, flags) pair if found, (None, None) if not.''' |
General Comments 0
You need to be logged in to leave comments.
Login now