phases, local and remote; topics

Uwe Brauer oub at mat.ucm.es
Wed Dec 23 13:50:14 UTC 2020


>>> "BMJ" == Becker, Mischa J <mischa.becker at kroger.com> writes:

>> From: Uwe Brauer <oub at mat.ucm.es>
>> Subject: Re: phases, local and remote; topics
>> 
>> >>> "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.

> On stepping thru all your test steps, it turns out some of the stuff I
> thought was true was incorrect. I also discovered a typo bug in your
> test which is probably why everything didn't work as you expected it
> to. See below.

>> > 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

> You have a typo here. It should be [phases] not [phase]. Also, on
> Windows 10, I had to capitalize False before mercurial would recognize
> that remote had been set to non-publishing in local settings. I used
> the following.

>   echo [phases] >> .hg/hgrc
>   echo publish=False >> .hg/hgrc

Ok, thanks for pointing out, I rerun my test. 
We did not mention explicitly what clone does, but as the name indicates
it clones the repository including the setting.

So if I set up a «remote» repository in the corrected way

    1. the changeset remote repository is draft

    2. and the changeest of the cloned repository is also draft and

    3. if I add  a new changeset it is draft

    4. and if I push it remains draft, independent whether I change my
       setting in the cloned repository.


If I had created my «remote» repository by 

echo [phases] >> .hg/hgrc
echo publish=True >> .hg/hgrc

Then 
    1. the changeset remote repository is draft

    2. and the changeset of the cloned repository is public draft and

    3. if I add  a new changeset it is draft

    4. and if I push it changes to public, independent whether I change my
       setting in the cloned repository.


Thanks very much. The most important lesson I learned is that the
behaviour I want for my pushes to Helix must be set in the helix
repository and as I said in my other email. They hopefully will address
this issue.

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/20201223/b7ce212e/attachment.p7s>


More information about the Mercurial mailing list