diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py index 5cc71484ee9c9d370cc2a4cce205a8a59867096e_bWVyY3VyaWFsL2xvY2FscmVwby5weQ==..0e4af72cbd7f3e4bfd2d010458467b784dae6ffe_bWVyY3VyaWFsL2xvY2FscmVwby5weQ== 100644 --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1762,6 +1762,9 @@ if not remote.canpush(): raise util.Abort(_("destination does not support push")) unfi = self.unfiltered() + def localphasemove(nodes, phase=phases.public): + """move <nodes> to <phase> in the local source repo""" + phases.advanceboundary(self, phase, nodes) # get local lock as we might write phase data locallock = self.lock() try: @@ -1883,10 +1886,10 @@ # on the remote. remotephases = {'publishing': 'True'} if not remotephases: # old server or public only repo - phases.advanceboundary(self, phases.public, cheads) + localphasemove(cheads) # don't push any phase data as there is nothing to push else: ana = phases.analyzeremotephases(self, cheads, remotephases) pheads, droots = ana ### Apply remote phase on local if remotephases.get('publishing', False): @@ -1887,8 +1890,8 @@ # don't push any phase data as there is nothing to push else: ana = phases.analyzeremotephases(self, cheads, remotephases) pheads, droots = ana ### Apply remote phase on local if remotephases.get('publishing', False): - phases.advanceboundary(self, phases.public, cheads) + localphasemove(cheads) else: # publish = False @@ -1894,6 +1897,6 @@ else: # publish = False - phases.advanceboundary(self, phases.public, pheads) - phases.advanceboundary(self, phases.draft, cheads) + localphasemove(pheads) + localphasemove(cheads, phases.draft) ### Apply local phase on remote # Get the list of all revs draft on remote by public here.