[2.1 CHANGES] MQ behavior regarding phases

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Jan 25 15:52:09 CST 2012


Recently one of our beloved users highlighted that the move to make mq
changeset secret break backward compatibility in the regard of pulling mq
changeset.

We have two conflicting views clashing here:

    * We must ensure that "people who need to" can still exchange mq patches.
    * We want other people to be able to use mq with the safety of secret
      changeset.

Therefor, They will be two mode for mq:

 * One which don't touch phase
 * One which ensure mq are alway secret.

Mode will be selected with the mq.secret option.

1) mq.secret=false
------------------


qnew: create draft changeset

qrefresh: keep the changeset in the phase it were.
          * draft changeset is refreshed as draft
          * secret changeset is refreshed as secret

qimport: don't touch the changeset phases

qpush: push patches as draft (so beware that a qpop/qpush patch may turn secret
       changeset draft)

Mercurial will see mq patches as draft the first time it touch an old repository

As mercurial make a lot of effort to stay backward compatible, this is the
default behavior. This is sad but necessary. People who want a safe mq should
set mq.secret=true.


2) mq.secret=true
------------------

qnew: create secret changeset

qrefresh: Original changeset is expected to be secret and therefor will be
          "qrefresh"'ed as secret
          * draft changeset are refreshed as draft
          * secret changeset are refreshed as secret

qimport: put changeset in the secret phase

qpush: push patches as secret

Security will probably be added to check that no mq changeset is set as draft
while in this mode.

mercurial will see mq patches as secret the first time it touch an old repository

Note that this behavior goes further than the currently implemented one. The
rational for this change is to have a very safe mq people can rely on. I want
the following sentence to be always true without having the user to care about
it:

   "In mq.secret==true, mq changeset are always secret."

The goal is to avoid saying "mq changeset are almost all the time secret".
Because once user spend month with "mq changeset are secret the way I use them"
he will be confused once in meet some of the corner case they are not.

We will probably wan't to update the mq documentation to advice user to choose this mode.


More information about the Mercurial-devel mailing list