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

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 5, 2016, 3:17 a.m.
Message ID <31a088bce7192a388ba4.1470367024@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/16112/
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 1470364883 25200
#      Thu Aug 04 19:41:23 2016 -0700
# Node ID 31a088bce7192a388ba402dbd0a35183293fffc8
# Parent  4c9b71d4c61cf99cd75469bff7d58bf0b2241bdd
changegroup: remove getlocalchangegroupraw() (API)

The previous patch removed the only in-tree consumer of this one-line
function. Use getchangegroupchunks() instead.
Augie Fackler - Aug. 5, 2016, 6:25 p.m.
On Thu, Aug 04, 2016 at 08:17:04PM -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1470364883 25200
> #      Thu Aug 04 19:41:23 2016 -0700
> # Node ID 31a088bce7192a388ba402dbd0a35183293fffc8
> # Parent  4c9b71d4c61cf99cd75469bff7d58bf0b2241bdd
> changegroup: remove getlocalchangegroupraw() (API)

Queued these, thanks

>
> The previous patch removed the only in-tree consumer of this one-line
> function. Use getchangegroupchunks() instead.
>
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -975,25 +975,16 @@ def changegroupsubset(repo, roots, heads
>
>      Another wrinkle is doing the reverse, figuring out which changeset in
>      the changegroup a particular filenode or manifestnode belongs to.
>      """
>      outgoing = discovery.outgoingbetween(repo, roots, 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."""
> -    return getchangegroupchunks(repo, outgoing, version, source,
> -                                bundlecaps=bundlecaps)[1]
> -
>  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
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Pierre-Yves David - Aug. 6, 2016, 12:20 a.m.
On 08/05/2016 08:25 PM, Augie Fackler wrote:
> On Thu, Aug 04, 2016 at 08:17:04PM -0700, Gregory Szorc wrote:
>> # HG changeset patch
>> # User Gregory Szorc <gregory.szorc@gmail.com>
>> # Date 1470364883 25200
>> #      Thu Aug 04 19:41:23 2016 -0700
>> # Node ID 31a088bce7192a388ba402dbd0a35183293fffc8
>> # Parent  4c9b71d4c61cf99cd75469bff7d58bf0b2241bdd
>> changegroup: remove getlocalchangegroupraw() (API)
>
> Queued these, thanks

I've feedback remaining on this series (we have a discussion going on 
from a previous version). I've dropped them from hg-committed.

Greg, you can pull a visible version using

hg pull -r e810e66d3c50 
https://www.mercurial-scm.org/repo/users/marmoute/mercurial-dropped/

Feedback on patch coming shortly.

Cheers,

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -975,25 +975,16 @@  def changegroupsubset(repo, roots, heads
 
     Another wrinkle is doing the reverse, figuring out which changeset in
     the changegroup a particular filenode or manifestnode belongs to.
     """
     outgoing = discovery.outgoingbetween(repo, roots, 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."""
-    return getchangegroupchunks(repo, outgoing, version, source,
-                                bundlecaps=bundlecaps)[1]
-
 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