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