Show More
@@ -850,7 +850,7 b' class cgpacker(object):' | |||||
850 | self._verbosenote(_('%8.i (changelog)\n') % size) |
|
850 | self._verbosenote(_('%8.i (changelog)\n') % size) | |
851 |
|
851 | |||
852 | clrevorder = clstate['clrevorder'] |
|
852 | clrevorder = clstate['clrevorder'] | |
853 | mfs = clstate['mfs'] |
|
853 | manifests = clstate['manifests'] | |
854 | changedfiles = clstate['changedfiles'] |
|
854 | changedfiles = clstate['changedfiles'] | |
855 |
|
855 | |||
856 | # We need to make sure that the linkrev in the changegroup refers to |
|
856 | # We need to make sure that the linkrev in the changegroup refers to | |
@@ -879,7 +879,7 b' class cgpacker(object):' | |||||
879 |
|
879 | |||
880 | size = 0 |
|
880 | size = 0 | |
881 | it = self.generatemanifests( |
|
881 | it = self.generatemanifests( | |
882 | commonrevs, clrevorder, fastpathlinkrev, mfs, fnodes, source, |
|
882 | commonrevs, clrevorder, fastpathlinkrev, manifests, fnodes, source, | |
883 | clstate['clrevtomanifestrev']) |
|
883 | clstate['clrevtomanifestrev']) | |
884 |
|
884 | |||
885 | for tree, deltas in it: |
|
885 | for tree, deltas in it: | |
@@ -905,9 +905,9 b' class cgpacker(object):' | |||||
905 | mfdicts = None |
|
905 | mfdicts = None | |
906 | if self._ellipses and self._isshallow: |
|
906 | if self._ellipses and self._isshallow: | |
907 | mfdicts = [(self._repo.manifestlog[n].read(), lr) |
|
907 | mfdicts = [(self._repo.manifestlog[n].read(), lr) | |
908 | for (n, lr) in mfs.iteritems()] |
|
908 | for (n, lr) in manifests.iteritems()] | |
909 |
|
909 | |||
910 | mfs.clear() |
|
910 | manifests.clear() | |
911 | clrevs = set(cl.rev(x) for x in clnodes) |
|
911 | clrevs = set(cl.rev(x) for x in clnodes) | |
912 |
|
912 | |||
913 | it = self.generatefiles(changedfiles, commonrevs, |
|
913 | it = self.generatefiles(changedfiles, commonrevs, | |
@@ -944,7 +944,7 b' class cgpacker(object):' | |||||
944 | chunk stream has been fully consumed. |
|
944 | chunk stream has been fully consumed. | |
945 | """ |
|
945 | """ | |
946 | clrevorder = {} |
|
946 | clrevorder = {} | |
947 | mfs = {} # needed manifests |
|
947 | manifests = {} | |
948 | mfl = self._repo.manifestlog |
|
948 | mfl = self._repo.manifestlog | |
949 | changedfiles = set() |
|
949 | changedfiles = set() | |
950 | clrevtomanifestrev = {} |
|
950 | clrevtomanifestrev = {} | |
@@ -957,7 +957,7 b' class cgpacker(object):' | |||||
957 | clrevorder[x] = len(clrevorder) |
|
957 | clrevorder[x] = len(clrevorder) | |
958 |
|
958 | |||
959 | if self._ellipses: |
|
959 | if self._ellipses: | |
960 | # Only update mfs if x is going to be sent. Otherwise we |
|
960 | # Only update manifests if x is going to be sent. Otherwise we | |
961 | # end up with bogus linkrevs specified for manifests and |
|
961 | # end up with bogus linkrevs specified for manifests and | |
962 | # we skip some manifest nodes that we should otherwise |
|
962 | # we skip some manifest nodes that we should otherwise | |
963 | # have sent. |
|
963 | # have sent. | |
@@ -967,7 +967,7 b' class cgpacker(object):' | |||||
967 | manifestnode = c.manifest |
|
967 | manifestnode = c.manifest | |
968 | # Record the first changeset introducing this manifest |
|
968 | # Record the first changeset introducing this manifest | |
969 | # version. |
|
969 | # version. | |
970 | mfs.setdefault(manifestnode, x) |
|
970 | manifests.setdefault(manifestnode, x) | |
971 | # Set this narrow-specific dict so we have the lowest |
|
971 | # Set this narrow-specific dict so we have the lowest | |
972 | # manifest revnum to look up for this cl revnum. (Part of |
|
972 | # manifest revnum to look up for this cl revnum. (Part of | |
973 | # mapping changelog ellipsis parents to manifest ellipsis |
|
973 | # mapping changelog ellipsis parents to manifest ellipsis | |
@@ -982,7 +982,7 b' class cgpacker(object):' | |||||
982 | changedfiles.update(c.files) |
|
982 | changedfiles.update(c.files) | |
983 | else: |
|
983 | else: | |
984 | # record the first changeset introducing this manifest version |
|
984 | # record the first changeset introducing this manifest version | |
985 | mfs.setdefault(c.manifest, x) |
|
985 | manifests.setdefault(c.manifest, x) | |
986 | # Record a complete list of potentially-changed files in |
|
986 | # Record a complete list of potentially-changed files in | |
987 | # this manifest. |
|
987 | # this manifest. | |
988 | changedfiles.update(c.files) |
|
988 | changedfiles.update(c.files) | |
@@ -991,7 +991,7 b' class cgpacker(object):' | |||||
991 |
|
991 | |||
992 | state = { |
|
992 | state = { | |
993 | 'clrevorder': clrevorder, |
|
993 | 'clrevorder': clrevorder, | |
994 | 'mfs': mfs, |
|
994 | 'manifests': manifests, | |
995 | 'changedfiles': changedfiles, |
|
995 | 'changedfiles': changedfiles, | |
996 | 'clrevtomanifestrev': clrevtomanifestrev, |
|
996 | 'clrevtomanifestrev': clrevtomanifestrev, | |
997 | } |
|
997 | } | |
@@ -1009,8 +1009,8 b' class cgpacker(object):' | |||||
1009 |
|
1009 | |||
1010 | return state, gen |
|
1010 | return state, gen | |
1011 |
|
1011 | |||
1012 |
def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, |
|
1012 | def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, | |
1013 | fnodes, source, clrevtolocalrev): |
|
1013 | manifests, fnodes, source, clrevtolocalrev): | |
1014 | """Returns an iterator of changegroup chunks containing manifests. |
|
1014 | """Returns an iterator of changegroup chunks containing manifests. | |
1015 |
|
1015 | |||
1016 | `source` is unused here, but is used by extensions like remotefilelog to |
|
1016 | `source` is unused here, but is used by extensions like remotefilelog to | |
@@ -1019,7 +1019,7 b' class cgpacker(object):' | |||||
1019 | repo = self._repo |
|
1019 | repo = self._repo | |
1020 | mfl = repo.manifestlog |
|
1020 | mfl = repo.manifestlog | |
1021 | dirlog = mfl._revlog.dirlog |
|
1021 | dirlog = mfl._revlog.dirlog | |
1022 | tmfnodes = {'': mfs} |
|
1022 | tmfnodes = {'': manifests} | |
1023 |
|
1023 | |||
1024 | # Callback for the manifest, used to collect linkrevs for filelog |
|
1024 | # Callback for the manifest, used to collect linkrevs for filelog | |
1025 | # revisions. |
|
1025 | # revisions. | |
@@ -1027,7 +1027,7 b' class cgpacker(object):' | |||||
1027 | def makelookupmflinknode(tree, nodes): |
|
1027 | def makelookupmflinknode(tree, nodes): | |
1028 | if fastpathlinkrev: |
|
1028 | if fastpathlinkrev: | |
1029 | assert not tree |
|
1029 | assert not tree | |
1030 | return mfs.__getitem__ |
|
1030 | return manifests.__getitem__ | |
1031 |
|
1031 | |||
1032 | def lookupmflinknode(x): |
|
1032 | def lookupmflinknode(x): | |
1033 | """Callback for looking up the linknode for manifests. |
|
1033 | """Callback for looking up the linknode for manifests. |
General Comments 0
You need to be logged in to leave comments.
Login now