publish =False to True, no change

Sietse Brouwer sbbrouwer at gmail.com
Thu Oct 11 16:12:09 UTC 2018


Uwe Brauer wrote:
 > After a push the changeset should be marked as public, but it is
 > not, it is marked as draft. I wounder whether this is a bug?

A possibly helpful clarification: there are two repositories that can be 
set to 'publish=True', namely your local and remote repository. It is 
only the setting of the *receiving* repo that matters:

- when you push, only the publish setting of the remote repo matters
- when you pull, only the publish setting of the local repo matters.

I've written out the cases in full, below.

Kind regards from Brouwer to Brauer,

Sietse Brouwer

All these cases assume that you are pushing/pulling commits that are in 
Draft phase.

Case 1:
local publish=True
remote publish=True

When you push from local to remote, the pushed commits and all their 
ancestors are marked as Public on the local and remote repos, because 
the receiving remote repo has publish=True.

When you pull from remote to local, the pulled commits are marked as 
Public on the local, because the receiving local repo has publish=True. 
(They remain in Draft on the remote, because of the read-only nature of 
pulling.)

Case 2:
local publish=False
remote publish=True

When you push from local to remote, the pushed commits and all their 
ancestors are marked as Public on the local and remote repos, because 
the receiving remote repo has publish=True.

When you pull from remote to local, the pulled commits remain in Draft 
phase on the local, because the receiving local repo has publish=False.
(They remain in Draft on the remote, also because of the read-only 
nature of pulling.)

Case 3:
local publish=True
remote publish=False

When you push from local to remote, the pushed commits and all their 
ancestors remain in Draft on the local and remote repos, because the 
receiving remote repo has publish=False.

When you pull from remote to local, the pulled commits are marked as 
Public on the local, because the receiving local repo has publish=True.
(They remain in Draft on the remote, because of the read-only nature of 
pulling.)

Case 4:
local publish=False
remote publish=False

When you push from local to remote, the pushed commits and all their 
ancestors remain in Draft on the local and remote repos, because the 
receiving remote repo has publish=False.

When you pull from remote to local, the pulled commits remain in Draft 
phase on the local, because the receiving local repo has publish=False.
(They remain in Draft on the remote, also because of the read-only 
nature of pulling.)



More information about the Mercurial mailing list