Show More
@@ -753,11 +753,10 b' class cgpacker(object):' | |||
|
753 | 753 | fastpathlinkrev, mfs, fnodes, source): |
|
754 | 754 | yield chunk |
|
755 | 755 | |
|
756 | if self._ellipses: | |
|
757 | mfdicts = None | |
|
758 | if self._isshallow: | |
|
759 | mfdicts = [(self._repo.manifestlog[n].read(), lr) | |
|
760 | for (n, lr) in mfs.iteritems()] | |
|
756 | mfdicts = None | |
|
757 | if self._ellipses and self._isshallow: | |
|
758 | mfdicts = [(self._repo.manifestlog[n].read(), lr) | |
|
759 | for (n, lr) in mfs.iteritems()] | |
|
761 | 760 | |
|
762 | 761 | mfs.clear() |
|
763 | 762 | clrevs = set(cl.rev(x) for x in clnodes) |
@@ -773,16 +772,8 b' class cgpacker(object):' | |||
|
773 | 772 | revs = ((r, llr(r)) for r in filerevlog) |
|
774 | 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 | 775 | for chunk in self.generatefiles(changedfiles, linknodes, commonrevs, |
|
785 | source): | |
|
776 | source, mfdicts): | |
|
786 | 777 | yield chunk |
|
787 | 778 | |
|
788 | 779 | yield self._close() |
@@ -935,13 +926,11 b' class cgpacker(object):' | |||
|
935 | 926 | yield self._manifestsend |
|
936 | 927 | |
|
937 | 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 | 931 | changedfiles = list(filter(self._filematcher, changedfiles)) |
|
940 | 932 | |
|
941 | 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 | 934 | # In a shallow clone, the linknodes callback needs to also include |
|
946 | 935 | # those file nodes that are in the manifests we sent but weren't |
|
947 | 936 | # introduced by those manifests. |
General Comments 0
You need to be logged in to leave comments.
Login now