Mercurial > evolve
diff hgext/simple4server.py @ 1253:d03583da89c4 stable
pull: fix bundle2 part generation
The new part generator (allowing partial pull) was unproperly installed.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 20 Apr 2015 13:36:12 +0200 |
parents | d001376b0c09 |
children | c52c15100fb2 |
line wrap: on
line diff
--- a/hgext/simple4server.py Sat Apr 11 10:35:26 2015 -0400 +++ b/hgext/simple4server.py Mon Apr 20 13:36:12 2015 +0200 @@ -255,10 +255,13 @@ caps += ' _evoext_getbundle_obscommon' return caps -def _getbundleobsmarkerpart(orig, bundler, repo, source, heads=None, common=None, - bundlecaps=None, **kwargs): +def _getbundleobsmarkerpart(orig, bundler, repo, source, **kwargs): if 'evo_obscommon' not in kwargs: - return orig(bundler, repo, source, heads, common, bundlecaps, **kwargs) + return orig(bundler, repo, source, **kwargs) + + heads = kwargs.get('heads') + if 'evo_obscommon' not in kwargs: + return orig(bundler, repo, source, **kwargs) if kwargs.get('obsmarkers', False): if heads is None: @@ -284,6 +287,10 @@ wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*') # wrap module content extensions.wrapfunction(exchange, '_pullbundle2extraprepare', _getbundleobsmarkerpart) + origfunc = exchange.getbundle2partsmapping['obsmarkers'] + def newfunc(*args, **kwargs): + return _getbundleobsmarkerpart(origfunc, *args, **kwargs) + exchange.getbundle2partsmapping['obsmarkers'] = newfunc extensions.wrapfunction(wireproto, 'capabilities', capabilities) # wrap command content oldcap, args = wireproto.commands['capabilities']