Making "hg push -r foo" changes phases

Jordi Gutiérrez Hermoso jordigh at octave.org
Mon Jun 17 08:48:12 CDT 2013


On 17 June 2013 09:24, Nikolaj Sjujskij <sterkrig at myopera.com> wrote:
> Den 2013-06-14 22:32:30 skrev Jordi Gutiérrez Hermoso <jordigh at octave.org>:
>
>
>> On 14 June 2013 14:25, Nikolaj Sjujskij <sterkrig at myopera.com> wrote:
>>>
>>>  By the way, have you considered using [alias]
>>> secretpush = !$HG phase -d $@ ; $HG push -r $@
>>
>> I'm still trying to figure out a way to use secret phases that seems
>> to make sense to everyone I talk to. Making everyone else use the
>> secretpush alias seems a bit wrong.
>
>  Well, I don't know. Current situation regarding pushing secret changesets
> makes sense to me. It is simple and consistent, and you can build up on it
> when you're sure what you want.

How do you create secret changesets without --force?

>> I think a proposal I had earlier for giving commit a --secret option
>> might make more sense. You know at the time of committing something if
>> that something should probably not be shared yet.
>
>
> [alias]
> secommit = !$HG commit $a ; $HG phase -fs .

Again, if I'm teaching hg to other people, telling them to create
magic aliases is wrong.

>> Also, going from
>> secret to anything else doesn't require a force from hg phase, but
>> going from anything to secret does.
>
>  Yep, I agree. I se no reason why "draft -> secret" needs --force.
> I think only manipulating with public changesets should require it.

There's a good reason why that needs force, because that's kind of the
whole point of phases. They record what has already been shared, and
they record this automatically. If you want to override the default
mechanism and tell hg, "no, wait, this wasn't really shared despite
what you think", then that should require a force. Hg needs to be able
to automatically track phase status.

- Jordi G. H.


More information about the Mercurial-devel mailing list