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:36:58 CST 2013


On 7 janv. 2013, at 00:58, Angel Ezquerra 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).

There is less danger than for public -> draft changes. But it is still not the natural movement.

(1) pull a draft changeset from a non-publishing server
(2) make it secret
(3) repull --> it turns draft again


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

Please Keep MQ ou tof the equation. MQ violate several principe of Mercurial. The `mq.secret` option is here to help making MQ insanity manageable.

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

You could have a lighter warning for draft -> secret movement. Removing all warning seems a bad idea.

Do you have a small checkbox in the commit dialog to make the commit secret? It seems the first step to improve user experience with phase in thg.

-- 
Pierre-Yves


More information about the Mercurial-devel mailing list