Making "hg push -r foo" changes phases

Jordi Gutiérrez Hermoso jordigh at octave.org
Fri Jun 14 13:30:36 UTC 2013


On 13 June 2013 10:43, Pierre-Yves David <pierre-yves.david at logilab.fr> wrote:
> On Thu, Jun 13, 2013 at 10:34:27AM -0400, Jordi Gutiérrez Hermoso wrote:
>> Would it make sense that when doing "hg push -r foo" that foo become a
>> draft or public phase if it was originally secret?
>>
>> I find it odd that hg push -r foo won't push foo, even if I just
>> explicitly requested it, just because foo is secret.
>
> Foo may be a lot of things, a branch name, a bookmark, a revset or an explicite hash.
>
> Making the distinction between those case is non trivial and maybe a bad idea.
>
> I'm not sure to be able to define a proper definition for "explicitly requested".

I'm not sure any of these cases need to be explicit. If you use -r,
you mean an explicit revision. If you use -b, you mean a particular
named branch. With -r, secret commits should be pushed, but not with
-b.

> Is this special case special enough?

I am trying to figure out how to effectively use secret commits. If I
change my default phase to secret, then I have to manually make
everything draft before I can push it. I thought explicitly requesting
commits to push would make sense instead of "hg phase -d foo". Perhaps
the hypothetical "hg commit --secret" command would be better.

- Jordi G. H.



More information about the Mercurial-devel mailing list