Show More
@@ -66,19 +66,6 b' def push(repo, remote, force=False, revs' | |||||
66 | if not pushop.remote.canpush(): |
|
66 | if not pushop.remote.canpush(): | |
67 | raise util.Abort(_("destination does not support push")) |
|
67 | raise util.Abort(_("destination does not support push")) | |
68 | unfi = pushop.repo.unfiltered() |
|
68 | unfi = pushop.repo.unfiltered() | |
69 | def localphasemove(pushop, nodes, phase=phases.public): |
|
|||
70 | """move <nodes> to <phase> in the local source repo""" |
|
|||
71 | if pushop.locallocked: |
|
|||
72 | phases.advanceboundary(pushop.repo, phase, nodes) |
|
|||
73 | else: |
|
|||
74 | # repo is not locked, do not change any phases! |
|
|||
75 | # Informs the user that phases should have been moved when |
|
|||
76 | # applicable. |
|
|||
77 | actualmoves = [n for n in nodes if phase < pushop.repo[n].phase()] |
|
|||
78 | phasestr = phases.phasenames[phase] |
|
|||
79 | if actualmoves: |
|
|||
80 | pushop.ui.status(_('cannot lock source repo, skipping ' |
|
|||
81 | 'local %s phase update\n') % phasestr) |
|
|||
82 | # get local lock as we might write phase data |
|
69 | # get local lock as we might write phase data | |
83 | locallock = None |
|
70 | locallock = None | |
84 | try: |
|
71 | try: | |
@@ -223,7 +210,7 b' def push(repo, remote, force=False, revs' | |||||
223 | # on the remote. |
|
210 | # on the remote. | |
224 | remotephases = {'publishing': 'True'} |
|
211 | remotephases = {'publishing': 'True'} | |
225 | if not remotephases: # old server or public only rer |
|
212 | if not remotephases: # old server or public only rer | |
226 | localphasemove(pushop, cheads) |
|
213 | _localphasemove(pushop, cheads) | |
227 | # don't push any phase data as there is nothing to push |
|
214 | # don't push any phase data as there is nothing to push | |
228 | else: |
|
215 | else: | |
229 | ana = phases.analyzeremotephases(pushop.repo, cheads, |
|
216 | ana = phases.analyzeremotephases(pushop.repo, cheads, | |
@@ -231,10 +218,10 b' def push(repo, remote, force=False, revs' | |||||
231 | pheads, droots = ana |
|
218 | pheads, droots = ana | |
232 | ### Apply remote phase on local |
|
219 | ### Apply remote phase on local | |
233 | if remotephases.get('publishing', False): |
|
220 | if remotephases.get('publishing', False): | |
234 | localphasemove(pushop, cheads) |
|
221 | _localphasemove(pushop, cheads) | |
235 | else: # publish = False |
|
222 | else: # publish = False | |
236 | localphasemove(pushop, pheads) |
|
223 | _localphasemove(pushop, pheads) | |
237 | localphasemove(pushop, cheads, phases.draft) |
|
224 | _localphasemove(pushop, cheads, phases.draft) | |
238 | ### Apply local phase on remote |
|
225 | ### Apply local phase on remote | |
239 |
|
226 | |||
240 | # Get the list of all revs draft on remote by public here. |
|
227 | # Get the list of all revs draft on remote by public here. | |
@@ -261,6 +248,20 b' def push(repo, remote, force=False, revs' | |||||
261 | _pushbookmark(pushop) |
|
248 | _pushbookmark(pushop) | |
262 | return ret |
|
249 | return ret | |
263 |
|
250 | |||
|
251 | def _localphasemove(pushop, nodes, phase=phases.public): | |||
|
252 | """move <nodes> to <phase> in the local source repo""" | |||
|
253 | if pushop.locallocked: | |||
|
254 | phases.advanceboundary(pushop.repo, phase, nodes) | |||
|
255 | else: | |||
|
256 | # repo is not locked, do not change any phases! | |||
|
257 | # Informs the user that phases should have been moved when | |||
|
258 | # applicable. | |||
|
259 | actualmoves = [n for n in nodes if phase < pushop.repo[n].phase()] | |||
|
260 | phasestr = phases.phasenames[phase] | |||
|
261 | if actualmoves: | |||
|
262 | pushop.ui.status(_('cannot lock source repo, skipping ' | |||
|
263 | 'local %s phase update\n') % phasestr) | |||
|
264 | ||||
264 | def _pushobsolete(pushop): |
|
265 | def _pushobsolete(pushop): | |
265 | """utility function to push obsolete markers to a remote""" |
|
266 | """utility function to push obsolete markers to a remote""" | |
266 | pushop.ui.debug('try to push obsolete markers to remote\n') |
|
267 | pushop.ui.debug('try to push obsolete markers to remote\n') |
General Comments 0
You need to be logged in to leave comments.
Login now