D671: changegroup: rename getsubsetraw to makestream

durham (Durham Goode) phabricator at mercurial-scm.org
Mon Sep 11 02:07:16 UTC 2017


durham created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D671

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -898,19 +898,17 @@
         for node in nodes:
             repo.ui.debug("%s\n" % hex(node))
 
-def makestream(repo, outgoing, version, source, fastpath=False,
-               bundlecaps=None):
-    bundler = getbundler(version, repo, bundlecaps=bundlecaps)
-    return getsubsetraw(repo, outgoing, bundler, source, fastpath=fastpath)
-
 def makechangegroup(repo, outgoing, version, source, fastpath=False,
                     bundlecaps=None):
     cgstream = makestream(repo, outgoing, version, source,
                           fastpath=fastpath, bundlecaps=bundlecaps)
     return getunbundler(version, util.chunkbuffer(cgstream), None,
                         {'clcount': len(outgoing.missing) })
 
-def getsubsetraw(repo, outgoing, bundler, source, fastpath=False):
+def makestream(repo, outgoing, version, source, fastpath=False,
+               bundlecaps=None):
+    bundler = getbundler(version, repo, bundlecaps=bundlecaps)
+
     repo = repo.unfiltered()
     commonrevs = outgoing.common
     csets = outgoing.missing



To: durham, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list