# HG changeset patch # User Pierre-Yves David # Date 1391141361 28800 # Node ID 9e54faf37ff8a57f3006b7941d81775562599abf # Parent 2f2e8d1c4856ea259373e8aeda9386a30a1d4af9 push: explicitly feed pushop to localphasemove Now that pushop is holding all the push related data, we do not really need a closure anymore. So we start feeding the object to `localphasemove` and will make it a normal function in the next commit. diff -r 2f2e8d1c4856 -r 9e54faf37ff8 mercurial/exchange.py --- a/mercurial/exchange.py Thu Jan 30 20:00:34 2014 -0800 +++ b/mercurial/exchange.py Thu Jan 30 20:09:21 2014 -0800 @@ -66,7 +66,7 @@ if not pushop.remote.canpush(): raise util.Abort(_("destination does not support push")) unfi = pushop.repo.unfiltered() - def localphasemove(nodes, phase=phases.public): + def localphasemove(pushop, nodes, phase=phases.public): """move to in the local source repo""" if pushop.locallocked: phases.advanceboundary(pushop.repo, phase, nodes) @@ -222,8 +222,8 @@ # courtesy to publish changesets possibly locally draft # on the remote. remotephases = {'publishing': 'True'} - if not remotephases: # old server or public only repo - localphasemove(cheads) + if not remotephases: # old server or public only rer + localphasemove(pushop, cheads) # don't push any phase data as there is nothing to push else: ana = phases.analyzeremotephases(pushop.repo, cheads, @@ -231,10 +231,10 @@ pheads, droots = ana ### Apply remote phase on local if remotephases.get('publishing', False): - localphasemove(cheads) + localphasemove(pushop, cheads) else: # publish = False - localphasemove(pheads) - localphasemove(cheads, phases.draft) + localphasemove(pushop, pheads) + localphasemove(pushop, cheads, phases.draft) ### Apply local phase on remote # Get the list of all revs draft on remote by public here.