# HG changeset patch # User Pierre-Yves David # Date 1393623877 28800 # Node ID 7671717afef85fa3eea326fa9496d1a973993388 # Parent fed090e07621a5474391020beaef58c49a7194e8 exchange: extract computation of pulled markers boundary in a function I expect massive experimentation on this specific aspect. so we better isolate it. diff -r fed090e07621 -r 7671717afef8 hgext/evolve.py --- 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"