# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1518090508 -19800 # Node ID e702ca152b337d7c29d6659a5f434ef4369aa5b5 # Parent 2fdc827f76ec4cc8c26d454d1240cdc03fe4d31e infinitepush: remove wrapping around bundle2._addpartsfromopts() This wrapping around bundle2._addpartsfromopts() was added by me while hacking on an alternate way to mark a push as infinitepush or not. However the wrapping is wrong as the push command does not go through the code path which was wrapped on the client side. Differential Revision: https://phab.mercurial-scm.org/D2101 diff -r 2fdc827f76ec -r e702ca152b33 hgext/infinitepush/__init__.py --- a/hgext/infinitepush/__init__.py Thu Feb 08 17:12:53 2018 +0530 +++ b/hgext/infinitepush/__init__.py Thu Feb 08 17:18:28 2018 +0530 @@ -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'))