Mercurial > public > mercurial-scm > hg
comparison mercurial/changegroup.py @ 34103:92f1e2be8ab6
changegroup: rename getsubsetraw to makestream
Now that nothing uses getsubsetraw except makestream, let's move the
functionality into the makestream. This removes the last remaining excess
changegroup creation function, getsubsetraw.
Differential Revision: https://phab.mercurial-scm.org/D671
author | Durham Goode <durham@fb.com> |
---|---|
date | Sun, 10 Sep 2017 18:52:40 -0700 |
parents | 5ede882c249c |
children | c8b6ed51386b |
comparison
equal
deleted
inserted
replaced
34102:dbf598196f05 | 34103:92f1e2be8ab6 |
---|---|
909 if repo.ui.debugflag: | 909 if repo.ui.debugflag: |
910 repo.ui.debug("list of changesets:\n") | 910 repo.ui.debug("list of changesets:\n") |
911 for node in nodes: | 911 for node in nodes: |
912 repo.ui.debug("%s\n" % hex(node)) | 912 repo.ui.debug("%s\n" % hex(node)) |
913 | 913 |
914 def makestream(repo, outgoing, version, source, fastpath=False, | |
915 bundlecaps=None): | |
916 bundler = getbundler(version, repo, bundlecaps=bundlecaps) | |
917 return getsubsetraw(repo, outgoing, bundler, source, fastpath=fastpath) | |
918 | |
919 def makechangegroup(repo, outgoing, version, source, fastpath=False, | 914 def makechangegroup(repo, outgoing, version, source, fastpath=False, |
920 bundlecaps=None): | 915 bundlecaps=None): |
921 cgstream = makestream(repo, outgoing, version, source, | 916 cgstream = makestream(repo, outgoing, version, source, |
922 fastpath=fastpath, bundlecaps=bundlecaps) | 917 fastpath=fastpath, bundlecaps=bundlecaps) |
923 return getunbundler(version, util.chunkbuffer(cgstream), None, | 918 return getunbundler(version, util.chunkbuffer(cgstream), None, |
924 {'clcount': len(outgoing.missing) }) | 919 {'clcount': len(outgoing.missing) }) |
925 | 920 |
926 def getsubsetraw(repo, outgoing, bundler, source, fastpath=False): | 921 def makestream(repo, outgoing, version, source, fastpath=False, |
922 bundlecaps=None): | |
923 bundler = getbundler(version, repo, bundlecaps=bundlecaps) | |
924 | |
927 repo = repo.unfiltered() | 925 repo = repo.unfiltered() |
928 commonrevs = outgoing.common | 926 commonrevs = outgoing.common |
929 csets = outgoing.missing | 927 csets = outgoing.missing |
930 heads = outgoing.missingheads | 928 heads = outgoing.missingheads |
931 # We go through the fast path if we get told to, or if all (unfiltered | 929 # We go through the fast path if we get told to, or if all (unfiltered |