phases, local and remote; topics
Uwe Brauer
oub at mat.ucm.es
Tue Dec 22 07:49:56 UTC 2020
>>> "BMJ" == Becker, Mischa J <mischa.becker at kroger.com> writes:
>> | | | remote | local | pull | push | clone |
>> |---+---------------+--------+-------+--------+--------+--------|
>> | 1 | phase publish | true | true | public | public | public |
>> | 2 | | true | false | draft | public | draft |
>> | 3 | | false | false | draft | draft | draft |
>> | 4 | | false | true | public | draft | public |
> I don't know how phase works with topics but this isn't how it works without topics.
Hm that is what Sietse Brouwer told me some time ago, but maybe I
misunderstood him.
> A commit's phase is initially set based on the publish setting of the
> repo you commit to. An existing draft commit will update to public if
> pushed into\pulled from a publish=true repo but a public commit
> doesn't down grade back to draft unless you force it.
I am still not sure I understand. Since I also use a clone command my
global setting comes into play. Let me try to rephrase the behaviour.
First I do
$ mkdir remote
$ cd remote
$ hg init
$ echo "[phase]\npublish=false" >> .hg/hgrc $ echo "First line" >>
test.org $ hg addremove $ hg ci -m "First commit not publishing"
That is now a non publishing repository (its first commit is in draft
mode) which works as my remote sandbox.
Now there are the following scenarios
1. My global .hgrc has
[phases]
publish = false
a. Then cloning from remote to local
hg clone remote local-no-publish.
leads to repository whose first changeset has the phase draft.
b. Committing a new changeset, results in a draft changeset.
c. Pushing this to the non publishing «remote» repository results in
a new changeset which is in draft mode
- in the local repository, but
- it also «arrives» in the remote repository as a draft changeset
2. Now I change my global setting
[phases]
publish = True
a. Then cloning from remote to local
hg clone remote local-publish
leads to a repository that has now 2 changesets (since I pushed
from local-publish), that are in public phase
b. Committing a new changeset, results in a draft changeset.
c. I push this new changeset to «remote», now
- I have three public changesets in my local-publish repository
(that confused my yesterday) but if I understand you correctly
since the first two changesets are public the third must be also
after pushing.
- But I have now also three *public* changesets in the remote
repository, although in this repository I have the setting
[phases]
publish = false
That is really a bit confusing.
Regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5673 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20201222/32e632fe/attachment.p7s>
More information about the Mercurial
mailing list