Patchwork [4,of,9,changegroup-apis] changegroup: remove getlocalchangegroupraw() (API)

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 1, 2016, 6:18 p.m.
Message ID <a96f832a74148b5d9fdc.1470075501@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/16018/
State Changes Requested
Delegated to: Pierre-Yves David
Headers show

Comments

Gregory Szorc - Aug. 1, 2016, 6:18 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1469901143 25200
#      Sat Jul 30 10:52:23 2016 -0700
# Node ID a96f832a74148b5d9fdc3649254ca745c9f98c47
# Parent  3504fd307dbcb6e367091081e638db3d106825c9
changegroup: remove getlocalchangegroupraw() (API)

The previous patch removed the only consumers of it.

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -943,28 +943,16 @@  def changegroupsubset(repo, roots, heads
     # TODO: remove call to nodesbetween.
     csets, roots, heads = cl.nodesbetween(roots, heads)
     included = set(csets)
     discbases = [n for n in discbases if n not in included]
     outgoing = discovery.outgoing(cl, discbases, heads)
     bundler = getbundler(version, repo)
     return getsubset(repo, outgoing, bundler, source)
 
-def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None,
-                           version='01'):
-    """Like getbundle, but taking a discovery.outgoing as an argument.
-
-    This is only implemented for local repos and reuses potentially
-    precomputed sets in outgoing. Returns a raw changegroup generator."""
-    if not outgoing.missing:
-        return None
-
-    emitter = changegroupemitter.fromoutgoing(repo, outgoing)
-    return emitter.emitchangegroupdata(version, source, bundlecaps=bundlecaps)
-
 def getlocalchangegroup(repo, source, outgoing, bundlecaps=None,
                         version='01'):
     """Like getbundle, but taking a discovery.outgoing as an argument.
 
     This is only implemented for local repos and reuses potentially
     precomputed sets in outgoing."""
     if not outgoing.missing:
         return None