Making "hg push -r foo" changes phases

Jordi Gutiérrez Hermoso jordigh at
Mon Jun 17 11:37:42 CDT 2013

On 17 June 2013 12:32, Angel Ezquerra <angel.ezquerra at> wrote:
> On Mon, Jun 17, 2013 at 6:19 PM, Jordi Gutiérrez Hermoso
> <jordigh at> wrote:

>> The reason why draft->secret requires a force is that drafts can be
>> shared between non-publishing repos. It's a kind of sharing that isn't
>> as widespread as a public repo, but it's still sharing. If you push a
>> secret phase to a non-publishing repo, it is now a draft, and it
>> should stay this way.
> I don't think that is a very strong reason to require a --force option
> for the draft-secret phase transition.
> It is true that draft revisions can be shared, but they are still
> mutable. Making a public changeset draft is dangerous because then
> mercurial will let you modify it (e.g. though amend, etc) where you
> could not modify it when it was public. Making a draft revision secret
> does not let you do things that you could not do before since draft
> revisions are already mutable.

There are two things that phases indicate: (1) should this commit be
pushed? (2) should this commit be modifiable? Once a commit is already
shareable, e.g. after it's already been shared, then to paraphrase
4chan, "what has been shared cannot be easily unshared." The force
here is there to indicate that we cannot easily unshare. It's part of
the whole point of phases.

- Jordi G. H.

More information about the Mercurial-devel mailing list