Comments
Patch
@@ -303,10 +303,24 @@ def _pushdiscoveryphase(pushop):
(computed for both success and failure case for changesets push)"""
outgoing = pushop.outgoing
unfi = pushop.repo.unfiltered()
remotephases = pushop.remote.listkeys('phases')
publishing = remotephases.get('publishing', False)
+ if (pushop.ui.configbool('ui', '_usedassubrepo', False)
+ and remotephases # server supports phases
+ and not pushop.outgoing.missing # no changesets to be pushed
+ and publishing):
+ # When:
+ # - this is a subrepo push
+ # - and remote support phase
+ # - and no changeset are to be pushed
+ # - and remote is publishing
+ # We may be in issue 3871 case!
+ # We drop the possible phase synchronisation done by
+ # courtesy to publish changesets possibly locally draft
+ # on the remote.
+ remotephases = {'publishing': 'True'}
ana = phases.analyzeremotephases(pushop.repo,
pushop.fallbackheads,
remotephases)
pheads, droots = ana
extracond = ''
@@ -1488,11 +1488,21 @@ Courtesy phases synchronisation to publi
$ cd ../../issue3781
$ cat >> .hg/hgrc << EOF
> [paths]
> default=../issue3781-dest/
> EOF
- $ hg push
+ $ hg push --config experimental.bundle2-exp=False
+ pushing to $TESTTMP/issue3781-dest (glob)
+ pushing subrepo s to $TESTTMP/issue3781-dest/s
+ searching for changes
+ no changes found
+ searching for changes
+ no changes found
+ [1]
+# clean the push cache
+ $ rm s/.hg/cache/storehash/*
+ $ hg push --config experimental.bundle2-exp=True
pushing to $TESTTMP/issue3781-dest (glob)
pushing subrepo s to $TESTTMP/issue3781-dest/s
searching for changes
no changes found
searching for changes