comparison mercurial/exchange.py @ 34096:f85dfde1731a

changegroup: replace getsubset with makechangegroup The current changegroup APIs are a bit of a mess. Currently you can use getsubsetraw, getsubset, changegroupsubset, getlocalchangegroupraw, getchangegroup, and getlocalchangroup to produce changegroups. This patch is the beginning of a refactor to boil all of that away to just makechangegroup and makestream. The first step adds the new functions and replaces getsubset function with them. Differential Revision: https://phab.mercurial-scm.org/D664
author Durham Goode <durham@fb.com>
date Sun, 10 Sep 2017 18:39:02 -0700
parents 13dc7f29531e
children d8245139e720
comparison
equal deleted inserted replaced
34095:7471193be725 34096:f85dfde1731a
961 # create a changegroup from local 961 # create a changegroup from local
962 if pushop.revs is None and not (outgoing.excluded 962 if pushop.revs is None and not (outgoing.excluded
963 or pushop.repo.changelog.filteredrevs): 963 or pushop.repo.changelog.filteredrevs):
964 # push everything, 964 # push everything,
965 # use the fast path, no race possible on push 965 # use the fast path, no race possible on push
966 bundler = changegroup.cg1packer(pushop.repo, bundlecaps) 966 cg = changegroup.makechangegroup(pushop.repo, outgoing, '01', 'push',
967 cg = changegroup.getsubset(pushop.repo, 967 fastpath=True, bundlecaps=bundlecaps)
968 outgoing,
969 bundler,
970 'push',
971 fastpath=True)
972 else: 968 else:
973 cg = changegroup.getchangegroup(pushop.repo, 'push', outgoing, 969 cg = changegroup.getchangegroup(pushop.repo, 'push', outgoing,
974 bundlecaps=bundlecaps) 970 bundlecaps=bundlecaps)
975 971
976 # apply changegroup to remote 972 # apply changegroup to remote