Mercurial > evolve
changeset 825:7671717afef8
exchange: extract computation of pulled markers boundary in a function
I expect massive experimentation on this specific aspect. so we better isolate
it.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 28 Feb 2014 13:44:37 -0800 |
parents | fed090e07621 |
children | bee5e1105e6c |
files | hgext/evolve.py |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Fri Feb 28 13:38:19 2014 -0800 +++ b/hgext/evolve.py Fri Feb 28 13:44:37 2014 -0800 @@ -2184,6 +2184,14 @@ lock.release() return wireproto.pushres(0) +def _buildpullobsmerkersboundaries(pullop): + """small funtion returning the argument for pull markers call + may to contains 'heads' and 'common'. skip the key for None. + + Its a separed functio to play around with strategy for that.""" + return {'heads': pullop.pulledsubset} + + @eh.wrapfunction(exchange, '_pullobsolete') def _pullobsolete(orig, pullop): if not obsolete._enabled: @@ -2193,7 +2201,8 @@ tr = None ui = pullop.repo.ui ui.status("OBSEXC: pull obsolescence markers\n") - obsdata = pullop.remote.evoext_pullobsmarkers_0(heads=pullop.pulledsubset) + boundaries = _buildpullobsmerkersboundaries(pullop) + obsdata = pullop.remote.evoext_pullobsmarkers_0(**boundaries) obsdata = obsdata.read() if len(obsdata) > 5: ui.status("OBSEXC: merging obsolescence markers (%i bytes)\n"