Mercurial > evolve
comparison hgext/evolve.py @ 1094:bb2c01cd096f
bundle2: burn some more of the old code
Some of it survived.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 29 Aug 2014 15:19:19 +0200 |
parents | a49f2e7a2755 |
children | 26334cfd4e95 |
comparison
equal
deleted
inserted
replaced
1093:a49f2e7a2755 | 1094:bb2c01cd096f |
---|---|
2492 common = findcommonobsmarkers(repo.ui, repo, remote, revs) | 2492 common = findcommonobsmarkers(repo.ui, repo, remote, revs) |
2493 return {'heads': pullop.pulledsubset, 'common': common} | 2493 return {'heads': pullop.pulledsubset, 'common': common} |
2494 | 2494 |
2495 @eh.uisetup | 2495 @eh.uisetup |
2496 def addgetbundleargs(self): | 2496 def addgetbundleargs(self): |
2497 if gboptsmap is not None: | 2497 gboptsmap['evo_obscommon'] = 'plain' |
2498 gboptsmap['evo_obsmarker'] = 'plain' | |
2499 gboptsmap['evo_obscommon'] = 'plain' | |
2500 gboptsmap['evo_obsheads'] = 'plain' | |
2501 else: | |
2502 gboptslist.append('evo_obsheads') | |
2503 gboptslist.append('evo_obscommon') | |
2504 gboptslist.append('evo_obsmarker') | |
2505 | |
2506 | |
2507 | |
2508 @eh.wrapfunction(exchange, '_getbundleextrapart') | |
2509 def _getbundleextrapart(orig, bundler, repo, source, **kwargs): | |
2510 if int(kwargs.pop('evo_obsmarker', False)): | |
2511 common = kwargs.pop('evo_obscommon') | |
2512 common = wireproto.decodelist(common) | |
2513 heads = kwargs.pop('evo_obsheads') | |
2514 heads = wireproto.decodelist(heads) | |
2515 obsdata = _getobsmarkersstream(repo, common=common, heads=heads) | |
2516 if len(obsdata.getvalue()) > 5: | |
2517 advparams = [('totalbytes', str(len(obsdata.getvalue())))] | |
2518 obspart = bundle2.bundlepart('EVOLVE:B2X:OBSMARKERV1', | |
2519 advisoryparams=advparams, | |
2520 data=obsdata) | |
2521 bundler.addpart(obspart) | |
2522 orig(bundler, repo, source) | |
2523 | 2498 |
2524 @eh.wrapfunction(exchange, '_pullobsolete') | 2499 @eh.wrapfunction(exchange, '_pullobsolete') |
2525 def _pullobsolete(orig, pullop): | 2500 def _pullobsolete(orig, pullop): |
2526 if not obsolete._enabled: | 2501 if not obsolete._enabled: |
2527 return None | 2502 return None |