##// END OF EJS Templates
push: factorise phase movement in a simple closure...
Pierre-Yves David -
r19096:0e4af72c stable
parent child Browse files
Show More
@@ -1762,6 +1762,9 b' class localrepository(object):'
1762 1762 if not remote.canpush():
1763 1763 raise util.Abort(_("destination does not support push"))
1764 1764 unfi = self.unfiltered()
1765 def localphasemove(nodes, phase=phases.public):
1766 """move <nodes> to <phase> in the local source repo"""
1767 phases.advanceboundary(self, phase, nodes)
1765 1768 # get local lock as we might write phase data
1766 1769 locallock = self.lock()
1767 1770 try:
@@ -1883,17 +1886,17 b' class localrepository(object):'
1883 1886 # on the remote.
1884 1887 remotephases = {'publishing': 'True'}
1885 1888 if not remotephases: # old server or public only repo
1886 phases.advanceboundary(self, phases.public, cheads)
1889 localphasemove(cheads)
1887 1890 # don't push any phase data as there is nothing to push
1888 1891 else:
1889 1892 ana = phases.analyzeremotephases(self, cheads, remotephases)
1890 1893 pheads, droots = ana
1891 1894 ### Apply remote phase on local
1892 1895 if remotephases.get('publishing', False):
1893 phases.advanceboundary(self, phases.public, cheads)
1896 localphasemove(cheads)
1894 1897 else: # publish = False
1895 phases.advanceboundary(self, phases.public, pheads)
1896 phases.advanceboundary(self, phases.draft, cheads)
1898 localphasemove(pheads)
1899 localphasemove(cheads, phases.draft)
1897 1900 ### Apply local phase on remote
1898 1901
1899 1902 # Get the list of all revs draft on remote by public here.
General Comments 0
You need to be logged in to leave comments. Login now