Patchwork [5,of,8] changegroup: remove changegroup() (API)

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 5, 2016, 3:17 a.m.
Message ID <d9a7b7fc58081021ec6f.1470367021@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/16109/
State Accepted
Headers show

Comments

Gregory Szorc - Aug. 5, 2016, 3:17 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1470366248 25200
#      Thu Aug 04 20:04:08 2016 -0700
# Node ID d9a7b7fc58081021ec6f7401300ac11998994a37
# Parent  2aef59d7c2ae22f6664b95f7d7f6ec385d2d1bab
changegroup: remove changegroup() (API)

It is a one-line function adding little value. Nuke it.

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -981,20 +981,16 @@  def getchangegroup(repo, source, heads=N
 
     The nodes in common might not all be known locally due to the way the
     current discovery protocol works.
     """
     outgoing = discovery.outgoingheadsandcommon(repo, heads, common)
     return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps,
                                version=version)
 
-def changegroup(repo, basenodes, source):
-    # to avoid a race we use changegroupsubset() (issue1320)
-    return changegroupsubset(repo, basenodes, repo.heads(), source)
-
 def _addchangegroupfiles(repo, source, revmap, trp, expectedfiles, needfiles):
     revisions = 0
     files = 0
     while True:
         chunkdata = source.filelogheader()
         if not chunkdata:
             break
         files += 1