Show More
@@ -656,8 +656,7 b' class cg1packer(object):' | |||||
656 | clrevorder = {} |
|
656 | clrevorder = {} | |
657 | mfs = {} # needed manifests |
|
657 | mfs = {} # needed manifests | |
658 | fnodes = {} # needed file nodes |
|
658 | fnodes = {} # needed file nodes | |
659 | # maps manifest node id -> set(changed files) |
|
659 | changedfiles = set() | |
660 | mfchangedfiles = {} |
|
|||
661 |
|
660 | |||
662 | # Callback for the changelog, used to collect changed files and manifest |
|
661 | # Callback for the changelog, used to collect changed files and manifest | |
663 | # nodes. |
|
662 | # nodes. | |
@@ -670,7 +669,7 b' class cg1packer(object):' | |||||
670 | mfs.setdefault(n, x) |
|
669 | mfs.setdefault(n, x) | |
671 | # Record a complete list of potentially-changed files in |
|
670 | # Record a complete list of potentially-changed files in | |
672 | # this manifest. |
|
671 | # this manifest. | |
673 |
|
|
672 | changedfiles.update(c[3]) | |
674 | return x |
|
673 | return x | |
675 |
|
674 | |||
676 | self._verbosenote(_('uncompressed size of bundle content:\n')) |
|
675 | self._verbosenote(_('uncompressed size of bundle content:\n')) | |
@@ -703,7 +702,7 b' class cg1packer(object):' | |||||
703 | 'treemanifest' not in repo.requirements) |
|
702 | 'treemanifest' not in repo.requirements) | |
704 |
|
703 | |||
705 | for chunk in self.generatemanifests(commonrevs, clrevorder, |
|
704 | for chunk in self.generatemanifests(commonrevs, clrevorder, | |
706 |
fastpathlinkrev, mfs, |
|
705 | fastpathlinkrev, mfs, fnodes): | |
707 | yield chunk |
|
706 | yield chunk | |
708 | mfs.clear() |
|
707 | mfs.clear() | |
709 | clrevs = set(cl.rev(x) for x in clnodes) |
|
708 | clrevs = set(cl.rev(x) for x in clnodes) | |
@@ -719,9 +718,6 b' class cg1packer(object):' | |||||
719 | revs = ((r, llr(r)) for r in filerevlog) |
|
718 | revs = ((r, llr(r)) for r in filerevlog) | |
720 | return dict((fln(r), cln(lr)) for r, lr in revs if lr in clrevs) |
|
719 | return dict((fln(r), cln(lr)) for r, lr in revs if lr in clrevs) | |
721 |
|
720 | |||
722 | changedfiles = set() |
|
|||
723 | for x in mfchangedfiles.itervalues(): |
|
|||
724 | changedfiles.update(x) |
|
|||
725 | for chunk in self.generatefiles(changedfiles, linknodes, commonrevs, |
|
721 | for chunk in self.generatefiles(changedfiles, linknodes, commonrevs, | |
726 | source): |
|
722 | source): | |
727 | yield chunk |
|
723 | yield chunk | |
@@ -732,7 +728,7 b' class cg1packer(object):' | |||||
732 | repo.hook('outgoing', node=hex(clnodes[0]), source=source) |
|
728 | repo.hook('outgoing', node=hex(clnodes[0]), source=source) | |
733 |
|
729 | |||
734 | def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, mfs, |
|
730 | def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, mfs, | |
735 |
|
|
731 | fnodes): | |
736 | repo = self._repo |
|
732 | repo = self._repo | |
737 | dirlog = repo.manifest.dirlog |
|
733 | dirlog = repo.manifest.dirlog | |
738 | tmfnodes = {'': mfs} |
|
734 | tmfnodes = {'': mfs} | |
@@ -763,28 +759,15 b' class cg1packer(object):' | |||||
763 | """ |
|
759 | """ | |
764 | clnode = tmfnodes[dir][x] |
|
760 | clnode = tmfnodes[dir][x] | |
765 | mdata = dirlog(dir).readshallowfast(x) |
|
761 | mdata = dirlog(dir).readshallowfast(x) | |
766 | if 'treemanifest' in repo.requirements: |
|
762 | for p, n, fl in mdata.iterentries(): | |
767 | for p, n, fl in mdata.iterentries(): |
|
763 | if fl == 't': # subdirectory manifest | |
768 | if fl == 't': # subdirectory manifest |
|
764 | subdir = dir + p + '/' | |
769 | subdir = dir + p + '/' |
|
765 | tmfclnodes = tmfnodes.setdefault(subdir, {}) | |
770 |
|
|
766 | tmfclnode = tmfclnodes.setdefault(n, clnode) | |
771 | tmfclnode = tmfclnodes.setdefault(n, clnode) |
|
767 | if clrevorder[clnode] < clrevorder[tmfclnode]: | |
772 |
|
|
768 | tmfclnodes[n] = clnode | |
773 | tmfclnodes[n] = clnode |
|
769 | else: | |
774 |
|
|
770 | f = dir + p | |
775 | f = dir + p |
|
|||
776 | fclnodes = fnodes.setdefault(f, {}) |
|
|||
777 | fclnode = fclnodes.setdefault(n, clnode) |
|
|||
778 | if clrevorder[clnode] < clrevorder[fclnode]: |
|
|||
779 | fclnodes[n] = clnode |
|
|||
780 | else: |
|
|||
781 | for f in mfchangedfiles[x]: |
|
|||
782 | try: |
|
|||
783 | n = mdata[f] |
|
|||
784 | except KeyError: |
|
|||
785 | continue |
|
|||
786 | # record the first changeset introducing this filelog |
|
|||
787 | # version |
|
|||
788 | fclnodes = fnodes.setdefault(f, {}) |
|
771 | fclnodes = fnodes.setdefault(f, {}) | |
789 | fclnode = fclnodes.setdefault(n, clnode) |
|
772 | fclnode = fclnodes.setdefault(n, clnode) | |
790 | if clrevorder[clnode] < clrevorder[fclnode]: |
|
773 | if clrevorder[clnode] < clrevorder[fclnode]: |
General Comments 0
You need to be logged in to leave comments.
Login now