Does it make sense to require --force when changing the phase from draft to secret?

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jan 6 18:40:52 CST 2013


On 7 janv. 2013, at 01:16, Sean Farley wrote:

> On Sun, Jan 6, 2013 at 5:58 PM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote:
>> Hi,
>> 
>> since the phase command was introduced TortoiseHg has had a "Change
>> phase" menu that lets the user change the phase of any revision. If
>> the phase moves "forward", i.e. in the secret -> draft -> public
>> direction, the phase change happens immediately.
>> 
>> However, if the requested phase change would move the phase
>> "backward", TortoiseHg shows a pretty lengthy and kind of scary
>> warning asking the user to be careful. This is important when the
>> original phase is public, but I wonder if it makes sense when moving
>> the phase from draft to secret. IMHO there is little danger in that
>> phase change (unless subrepos are involved, but that is a whole
>> different subject in itself).
>> 
>> As a matter of fact, mercurial can already be configured to
>> automatically move revisions from draft to secret (when importing them
>> to mq), and it does so without warning or requiring to use --force.
>> 
>> So I'm considering removing the warning that TortoiseHg shows when
>> going from draft to secret. However that would mean behaving a bit
>> differently than mercurial, which we don't normally do.
>> 
>> So I'd like to ask your opinion. Does it really make sense to require
>> using --force when changing the phase from draft to secret? Other than
>> to make things consistent (which is very important of course!) I don't
>> see much reason to do so. Would it be OK to have TortoiseHg not show a
>> warning in that case?
>> 
>> What do you guys think?
> 
> I know I would like a way to move from draft to secret without using
> mq or --force. Since I've been using the evolution extension (which is
> great!) as a replacement for mq, I find there is no way to create a
> commit that is secret. Slightly annoying, but it'd be one less command
> to issue :-/

you can use:

   hg commit --config phases.new-commit=secret

OK, this is a terrible user interface.
To make it worse, config option can not be aliased.

We could have a better user interface. It every body responsibility to comes with good idea on this topic.

ps: make sure you are up to date with your evolve extension.

-- 
Pierre-Yves


More information about the Mercurial-devel mailing list