Patchwork D2101: infinitepush: remove wrapping around bundle2._addpartsfromopts()

login
register
mail settings
Submitter phabricator
Date March 30, 2018, 7:52 p.m.
Message ID <da06a048f7350335af7d50ebba1716b3@localhost.localdomain>
Download mbox | patch
Permalink /patch/29994/
State Not Applicable
Headers show

Comments

phabricator - March 30, 2018, 7:52 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe702ca152b33: infinitepush: remove wrapping around bundle2._addpartsfromopts() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2101?vs=5362&id=7416

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

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py
+++ b/hgext/infinitepush/__init__.py
@@ -165,9 +165,6 @@ 
 configitem('infinitepush', 'reponame',
     default='',
 )
-configitem('infinitepush', 'bundle-stream',
-    default=False,
-)
 configitem('scratchbranch', 'storepath',
     default='',
 )
@@ -360,7 +357,6 @@ 
     extensions.wrapcommand(commands.table, 'update', _update)
 
     extensions.wrapfunction(discovery, 'checkheads', _checkheads)
-    extensions.wrapfunction(bundle2, '_addpartsfromopts', _addpartsfromopts)
 
     wireproto.wirepeer.listkeyspatterns = listkeyspatterns
 
@@ -427,18 +423,6 @@ 
         return
     return orig(pushop)
 
-def _addpartsfromopts(orig, ui, repo, bundler, *args, **kwargs):
-    """ adds a stream level part to bundle2 storing whether this is an
-    infinitepush bundle or not
-    This functionality is hidden behind a config option:
-
-    [infinitepush]
-    bundle-stream = True
-    """
-    if ui.configbool('infinitepush', 'bundle-stream', False):
-        bundler.addparam('infinitepush', True)
-    return orig(ui, repo, bundler, *args, **kwargs)
-
 def wireprotolistkeyspatterns(repo, proto, namespace, patterns):
     patterns = wireproto.decodelist(patterns)
     d = repo.listkeys(encoding.tolocal(namespace), patterns).iteritems()
@@ -1255,14 +1239,6 @@ 
         if bundle:
             bundle.close()
 
-@bundle2.b2streamparamhandler('infinitepush')
-def processinfinitepush(unbundler, param, value):
-    """ process the bundle2 stream level parameter containing whether this push
-    is an infinitepush or not. """
-    if value and unbundler.ui.configbool('infinitepush',
-                                         'bundle-stream', False):
-        pass
-
 @bundle2.parthandler(scratchbranchparttype,
                      ('bookmark', 'bookprevnode' 'create', 'force',
                       'pushbackbookmarks', 'cgversion'))