##// END OF EJS Templates
changegroup: pass mfdicts properly...
Gregory Szorc -
r39019:fbbda9ff default
parent child Browse files
Show More
@@ -753,9 +753,8 b' class cgpacker(object):'
753 fastpathlinkrev, mfs, fnodes, source):
753 fastpathlinkrev, mfs, fnodes, source):
754 yield chunk
754 yield chunk
755
755
756 if self._ellipses:
757 mfdicts = None
756 mfdicts = None
758 if self._isshallow:
757 if self._ellipses and self._isshallow:
759 mfdicts = [(self._repo.manifestlog[n].read(), lr)
758 mfdicts = [(self._repo.manifestlog[n].read(), lr)
760 for (n, lr) in mfs.iteritems()]
759 for (n, lr) in mfs.iteritems()]
761
760
@@ -773,16 +772,8 b' class cgpacker(object):'
773 revs = ((r, llr(r)) for r in filerevlog)
772 revs = ((r, llr(r)) for r in filerevlog)
774 return dict((fln(r), cln(lr)) for r, lr in revs if lr in clrevs)
773 return dict((fln(r), cln(lr)) for r, lr in revs if lr in clrevs)
775
774
776 if self._ellipses:
777 # We need to pass the mfdicts variable down into
778 # generatefiles(), but more than one command might have
779 # wrapped generatefiles so we can't modify the function
780 # signature. Instead, we pass the data to ourselves using an
781 # instance attribute. I'm sorry.
782 self._mfdicts = mfdicts
783
784 for chunk in self.generatefiles(changedfiles, linknodes, commonrevs,
775 for chunk in self.generatefiles(changedfiles, linknodes, commonrevs,
785 source):
776 source, mfdicts):
786 yield chunk
777 yield chunk
787
778
788 yield self._close()
779 yield self._close()
@@ -935,13 +926,11 b' class cgpacker(object):'
935 yield self._manifestsend
926 yield self._manifestsend
936
927
937 # The 'source' parameter is useful for extensions
928 # The 'source' parameter is useful for extensions
938 def generatefiles(self, changedfiles, linknodes, commonrevs, source):
929 def generatefiles(self, changedfiles, linknodes, commonrevs, source,
930 mfdicts):
939 changedfiles = list(filter(self._filematcher, changedfiles))
931 changedfiles = list(filter(self._filematcher, changedfiles))
940
932
941 if self._isshallow:
933 if self._isshallow:
942 # See comment in generate() for why this sadness is a thing.
943 mfdicts = self._mfdicts
944 del self._mfdicts
945 # In a shallow clone, the linknodes callback needs to also include
934 # In a shallow clone, the linknodes callback needs to also include
946 # those file nodes that are in the manifests we sent but weren't
935 # those file nodes that are in the manifests we sent but weren't
947 # introduced by those manifests.
936 # introduced by those manifests.
General Comments 0
You need to be logged in to leave comments. Login now