##// END OF EJS Templates
changegroup: track changelog to manifest revision map explicitly...
Gregory Szorc -
r39034:40374b4a default
parent child Browse files
Show More
@@ -661,14 +661,10 b' class cgpacker(object):'
661 # Maps CL revs to per-revlog revisions. Cleared in close() at
661 # Maps CL revs to per-revlog revisions. Cleared in close() at
662 # the end of each group.
662 # the end of each group.
663 self._clrevtolocalrev = {}
663 self._clrevtolocalrev = {}
664 self._nextclrevtolocalrev = {}
665
664
666 def _close(self):
665 def _close(self):
667 # Ellipses serving mode.
666 # Ellipses serving mode.
668 self._clrevtolocalrev.clear()
667 self._clrevtolocalrev.clear()
669 if self._nextclrevtolocalrev is not None:
670 self._clrevtolocalrev = self._nextclrevtolocalrev
671 self._nextclrevtolocalrev = None
672
668
673 return closechunk()
669 return closechunk()
674
670
@@ -784,6 +780,9 b' class cgpacker(object):'
784 mfs = clstate['mfs']
780 mfs = clstate['mfs']
785 changedfiles = clstate['changedfiles']
781 changedfiles = clstate['changedfiles']
786
782
783 if self._ellipses:
784 self._clrevtolocalrev = clstate['clrevtomanifestrev']
785
787 # We need to make sure that the linkrev in the changegroup refers to
786 # We need to make sure that the linkrev in the changegroup refers to
788 # the first changeset that introduced the manifest or file revision.
787 # the first changeset that introduced the manifest or file revision.
789 # The fastpath is usually safer than the slowpath, because the filelogs
788 # The fastpath is usually safer than the slowpath, because the filelogs
@@ -853,6 +852,7 b' class cgpacker(object):'
853 # TODO violates storage abstraction.
852 # TODO violates storage abstraction.
854 mfrevlog = mfl._revlog
853 mfrevlog = mfl._revlog
855 changedfiles = set()
854 changedfiles = set()
855 clrevtomanifestrev = {}
856
856
857 # Callback for the changelog, used to collect changed files and
857 # Callback for the changelog, used to collect changed files and
858 # manifest nodes.
858 # manifest nodes.
@@ -876,8 +876,7 b' class cgpacker(object):'
876 # manifest revnum to look up for this cl revnum. (Part of
876 # manifest revnum to look up for this cl revnum. (Part of
877 # mapping changelog ellipsis parents to manifest ellipsis
877 # mapping changelog ellipsis parents to manifest ellipsis
878 # parents)
878 # parents)
879 self._nextclrevtolocalrev.setdefault(cl.rev(x),
879 clrevtomanifestrev.setdefault(cl.rev(x), mfrevlog.rev(n))
880 mfrevlog.rev(n))
881 # We can't trust the changed files list in the changeset if the
880 # We can't trust the changed files list in the changeset if the
882 # client requested a shallow clone.
881 # client requested a shallow clone.
883 if self._isshallow:
882 if self._isshallow:
@@ -903,6 +902,7 b' class cgpacker(object):'
903 'clrevorder': clrevorder,
902 'clrevorder': clrevorder,
904 'mfs': mfs,
903 'mfs': mfs,
905 'changedfiles': changedfiles,
904 'changedfiles': changedfiles,
905 'clrevtomanifestrev': clrevtomanifestrev,
906 }
906 }
907
907
908 gen = self.group(revs, cl, True, lookupcl, units=_('changesets'))
908 gen = self.group(revs, cl, True, lookupcl, units=_('changesets'))
General Comments 0
You need to be logged in to leave comments. Login now