##// END OF EJS Templates
subrepo: allows to drop courtesy phase sync (issue3781)...
Pierre-Yves David -
r18520:751135cc stable
parent child Browse files
Show More
@@ -1874,6 +1874,20 b' class localrepository(object):'
1874 cheads.extend(c.node() for c in revset)
1874 cheads.extend(c.node() for c in revset)
1875 # even when we don't push, exchanging phase data is useful
1875 # even when we don't push, exchanging phase data is useful
1876 remotephases = remote.listkeys('phases')
1876 remotephases = remote.listkeys('phases')
1877 if (self.ui.configbool('ui', '_usedassubrepo', False)
1878 and remotephases # server supports phases
1879 and ret is None # nothing was pushed
1880 and remotephases.get('publishing', False)):
1881 # When:
1882 # - this is a subrepo push
1883 # - and remote support phase
1884 # - and no changeset was pushed
1885 # - and remote is publishing
1886 # We may be in issue 3871 case!
1887 # We drop the possible phase synchronisation done by
1888 # courtesy to publish changesets possibly locally draft
1889 # on the remote.
1890 remotephases = {'publishing': 'True'}
1877 if not remotephases: # old server or public only repo
1891 if not remotephases: # old server or public only repo
1878 phases.advanceboundary(self, phases.public, cheads)
1892 phases.advanceboundary(self, phases.public, cheads)
1879 # don't push any phase data as there is nothing to push
1893 # don't push any phase data as there is nothing to push
@@ -423,6 +423,7 b' class hgsubrepo(abstractsubrepo):'
423 v = r.ui.config(s, k)
423 v = r.ui.config(s, k)
424 if v:
424 if v:
425 self._repo.ui.setconfig(s, k, v)
425 self._repo.ui.setconfig(s, k, v)
426 self._repo.ui.setconfig('ui', '_usedassubrepo', 'True')
426 self._initrepo(r, state[0], create)
427 self._initrepo(r, state[0], create)
427
428
428 @annotatesubrepoerror
429 @annotatesubrepoerror
@@ -1062,3 +1062,27 b' Forgetting an explicit path in a subrepo'
1062 ? s/f19
1062 ? s/f19
1063 $ rm s/f19
1063 $ rm s/f19
1064 $ cd ..
1064 $ cd ..
1065
1066 Courtesy phases synchronisation to publishing server does not block the push
1067 (issue3781)
1068
1069 $ cp -r main issue3781
1070 $ cp -r main issue3781-dest
1071 $ cd issue3781-dest/s
1072 $ hg phase tip # show we have draft changeset
1073 5: draft
1074 $ chmod a-w .hg/store/phaseroots # prevent phase push
1075 $ cd ../../issue3781
1076 $ cat >> .hg/hgrc << EOF
1077 > [paths]
1078 > default=../issue3781-dest/
1079 > EOF
1080 $ hg push
1081 pushing to $TESTTMP/issue3781-dest
1082 pushing subrepo s to $TESTTMP/issue3781-dest/s
1083 searching for changes
1084 no changes found
1085 searching for changes
1086 no changes found
1087 [1]
1088
General Comments 0
You need to be logged in to leave comments. Login now