Patchwork [3,of,4] bundle2: remove _getbundleextrapart

login
register
mail settings
Submitter Mike Hommey
Date Sept. 25, 2014, 2:56 a.m.
Message ID <17baf7a6335c720094b1.1411613760@zenigata.glandium.org>
Download mbox | patch
Permalink /patch/5972/
State Accepted
Commit e4aeb14248ca056584e0e60bff00ab5ec4db34a0
Headers show

Comments

Mike Hommey - Sept. 25, 2014, 2:56 a.m.
# HG changeset patch
# User Mike Hommey <mh@glandium.org>
# Date 1411613608 -32400
#      Thu Sep 25 11:53:28 2014 +0900
# Node ID 17baf7a6335c720094b1e4d1b2b2c9d9911b5ba5
# Parent  7abbac9233058376fdcbfef0549e6714e3bf9711
bundle2: remove _getbundleextrapart

Extensions can now add new part generators with the getbundle2partsgenerator
decorator instead.
Pierre-Yves David - Sept. 25, 2014, 3:53 a.m.
On 09/24/2014 07:56 PM, Mike Hommey wrote:
> # HG changeset patch
> # User Mike Hommey <mh@glandium.org>
> # Date 1411613608 -32400
> #      Thu Sep 25 11:53:28 2014 +0900
> # Node ID 17baf7a6335c720094b1e4d1b2b2c9d9911b5ba5
> # Parent  7abbac9233058376fdcbfef0549e6714e3bf9711
> bundle2: remove _getbundleextrapart
>
> Extensions can now add new part generators with the getbundle2partsgenerator
> decorator instead.

When I said it should be removed, I meant in the future. I know a few 
extension using that that could use some grace period to move over the 
new thing. Let do that in one or two week instead.
Mike Hommey - Sept. 25, 2014, 4:17 a.m.
On Wed, Sep 24, 2014 at 08:53:38PM -0700, Pierre-Yves David wrote:
> 
> 
> On 09/24/2014 07:56 PM, Mike Hommey wrote:
> ># HG changeset patch
> ># User Mike Hommey <mh@glandium.org>
> ># Date 1411613608 -32400
> >#      Thu Sep 25 11:53:28 2014 +0900
> ># Node ID 17baf7a6335c720094b1e4d1b2b2c9d9911b5ba5
> ># Parent  7abbac9233058376fdcbfef0549e6714e3bf9711
> >bundle2: remove _getbundleextrapart
> >
> >Extensions can now add new part generators with the getbundle2partsgenerator
> >decorator instead.
> 
> When I said it should be removed, I meant in the future. I know a few
> extension using that that could use some grace period to move over the new
> thing. Let do that in one or two week instead.

Feel free to queue it. I doubt the patch will bitrot.

Mike
Pierre-Yves David - Oct. 16, 2014, 11:05 p.m.
On 09/24/2014 09:17 PM, Mike Hommey wrote:
> On Wed, Sep 24, 2014 at 08:53:38PM -0700, Pierre-Yves David wrote:
>>
>>
>> On 09/24/2014 07:56 PM, Mike Hommey wrote:
>>> # HG changeset patch
>>> # User Mike Hommey <mh@glandium.org>
>>> # Date 1411613608 -32400
>>> #      Thu Sep 25 11:53:28 2014 +0900
>>> # Node ID 17baf7a6335c720094b1e4d1b2b2c9d9911b5ba5
>>> # Parent  7abbac9233058376fdcbfef0549e6714e3bf9711
>>> bundle2: remove _getbundleextrapart
>>>
>>> Extensions can now add new part generators with the getbundle2partsgenerator
>>> decorator instead.
>>
>> When I said it should be removed, I meant in the future. I know a few
>> extension using that that could use some grace period to move over the new
>> thing. Let do that in one or two week instead.
>
> Feel free to queue it. I doubt the patch will bitrot.

This one is pushed to the clowncopter, thanks

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1056,22 +1056,16 @@  def _getbundleobsmarkerpart(bundler, rep
     """add an obsolescence markers part to the requested bundle"""
     if kwargs.get('obsmarkers', False):
         if heads is None:
             heads = repo.heads()
         subset = [c.node() for c in repo.set('::%ln', heads)]
         markers = repo.obsstore.relevantmarkers(subset)
         buildobsmarkerspart(bundler, markers)
 
-@getbundle2partsgenerator('extra')
-def _getbundleextrapart(bundler, repo, source, heads=None, common=None,
-                        bundlecaps=None, b2caps=None, **kwargs):
-    """hook function to let extensions add parts to the requested bundle"""
-    pass
-
 def check_heads(repo, their_heads, context):
     """check if the heads of a repo have been modified
 
     Used by peer for unbundling.
     """
     heads = repo.heads()
     heads_hash = util.sha1(''.join(sorted(heads))).digest()
     if not (their_heads == ['force'] or their_heads == heads or