Show More
@@ -912,6 +912,18 b' def _changegroupinfo(repo, nodes, source' | |||
|
912 | 912 | for node in nodes: |
|
913 | 913 | repo.ui.debug("%s\n" % hex(node)) |
|
914 | 914 | |
|
915 | def makestream(repo, outgoing, version, source, fastpath=False, | |
|
916 | bundlecaps=None): | |
|
917 | bundler = getbundler(version, repo, bundlecaps=bundlecaps) | |
|
918 | return getsubsetraw(repo, outgoing, bundler, source, fastpath=fastpath) | |
|
919 | ||
|
920 | def makechangegroup(repo, outgoing, version, source, fastpath=False, | |
|
921 | bundlecaps=None): | |
|
922 | cgstream = makestream(repo, outgoing, version, source, | |
|
923 | fastpath=fastpath, bundlecaps=bundlecaps) | |
|
924 | return getunbundler(version, util.chunkbuffer(cgstream), None, | |
|
925 | {'clcount': len(outgoing.missing) }) | |
|
926 | ||
|
915 | 927 | def getsubsetraw(repo, outgoing, bundler, source, fastpath=False): |
|
916 | 928 | repo = repo.unfiltered() |
|
917 | 929 | commonrevs = outgoing.common |
@@ -928,11 +940,6 b' def getsubsetraw(repo, outgoing, bundler' | |||
|
928 | 940 | _changegroupinfo(repo, csets, source) |
|
929 | 941 | return bundler.generate(commonrevs, csets, fastpathlinkrev, source) |
|
930 | 942 | |
|
931 | def getsubset(repo, outgoing, bundler, source, fastpath=False): | |
|
932 | gengroup = getsubsetraw(repo, outgoing, bundler, source, fastpath) | |
|
933 | return getunbundler(bundler.version, util.chunkbuffer(gengroup), None, | |
|
934 | {'clcount': len(outgoing.missing)}) | |
|
935 | ||
|
936 | 943 | def changegroupsubset(repo, roots, heads, source, version='01'): |
|
937 | 944 | """Compute a changegroup consisting of all the nodes that are |
|
938 | 945 | descendants of any of the roots and ancestors of any of the heads. |
@@ -947,8 +954,7 b' def changegroupsubset(repo, roots, heads' | |||
|
947 | 954 | the changegroup a particular filenode or manifestnode belongs to. |
|
948 | 955 | """ |
|
949 | 956 | outgoing = discovery.outgoing(repo, missingroots=roots, missingheads=heads) |
|
950 | bundler = getbundler(version, repo) | |
|
951 | return getsubset(repo, outgoing, bundler, source) | |
|
957 | return makechangegroup(repo, outgoing, version, source) | |
|
952 | 958 | |
|
953 | 959 | def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None, |
|
954 | 960 | version='01'): |
@@ -969,8 +975,8 b' def getchangegroup(repo, source, outgoin' | |||
|
969 | 975 | precomputed sets in outgoing.""" |
|
970 | 976 | if not outgoing.missing: |
|
971 | 977 | return None |
|
972 | bundler = getbundler(version, repo, bundlecaps) | |
|
973 | return getsubset(repo, outgoing, bundler, source) | |
|
978 | return makechangegroup(repo, outgoing, version, source, | |
|
979 | bundlecaps=bundlecaps) | |
|
974 | 980 | |
|
975 | 981 | def getlocalchangegroup(repo, *args, **kwargs): |
|
976 | 982 | repo.ui.deprecwarn('getlocalchangegroup is deprecated, use getchangegroup', |
@@ -963,12 +963,8 b' def _pushchangeset(pushop):' | |||
|
963 | 963 | or pushop.repo.changelog.filteredrevs): |
|
964 | 964 | # push everything, |
|
965 | 965 | # use the fast path, no race possible on push |
|
966 |
|
|
|
967 | cg = changegroup.getsubset(pushop.repo, | |
|
968 | outgoing, | |
|
969 | bundler, | |
|
970 | 'push', | |
|
971 | fastpath=True) | |
|
966 | cg = changegroup.makechangegroup(pushop.repo, outgoing, '01', 'push', | |
|
967 | fastpath=True, bundlecaps=bundlecaps) | |
|
972 | 968 | else: |
|
973 | 969 | cg = changegroup.getchangegroup(pushop.repo, 'push', outgoing, |
|
974 | 970 | bundlecaps=bundlecaps) |
General Comments 0
You need to be logged in to leave comments.
Login now