Some initial impressions of phases

Jason Harris jason at jasonfharris.com
Tue Jan 24 05:48:55 CST 2012


On Jan 24, 2012, at 12:22 PM, Pierre-Yves David wrote:
> On Tue, Jan 24, 2012 at 10:57:16AM +0100, Martin Geisler wrote:
>> Jason Harris <jason at jasonfharris.com> writes:
>>> On Jan 23, 2012, at 11:03 PM, Matt Mackall wrote:
>>>>> Jason Harris <jason at jasonfharris.com> writes:
>>>>> 
>>>>> Point 11.
>>>>> 
>>>>> A local clone resets the phase to public. It shouldn't.
>>>> 
>>>> Debated elsewhere, many arguments pro and against exist.
>>> 
>>> Well, I believe it's going to cause problems in practice. Local clones
>>> for experimentation are going to be hampered with having to manually
>>> adjust the phase for each clone.
>> 
>> It was my understanding from the beginning that draft changesets are
>> meant to be shared and that they were meant to be shared *as draft*.
>> This is why I think they should remain drafts when you clone. Public
>> servers can set publishing=True so that everything pushed there becomes
>> public.
> 
> We already have a well defined concept to say "I wan't draft to stay draft":
> 
>    http://selenic.com/hg/rev/218ec96c45d7

Sorry maybe I missed it in reading that, but you meant "I want draft to stay draft" right?
If so how do I do this?

Do you mean that if I set
[phases]
publish = 0

or publish =1, or publish = 2 in my hgrc then a local clone is meant to preserve the phase?
If so this doesn't happen.

Point 12:
Note of course we should use private, draft, public, instead of 0, 1, 2.

Point 13:
BTW for the documentation there is no help in the hgrc about phase.
Eg 'hg help hgrc' doesn't mention anything about phase settings.

>    (And We have valid reason not to turn it on by default)
> 
> We don't have any way now to detect a branch clone is intended to be private to
> the dev only.
> 
> I'll keep recommand the existing, simple and well defined way to have the
> expected behavior. I probably won't change my mind[1] until someone came with a
> meaninful proposal on this matter and a simple alteration of clone behavior.

It might be simple, but it's highly highly inconvenient for working with clones.
This is really a case where we should separate what is easy to for implementation
and what works well for users.

At least there needs to be *some* way to get the behavior that most users will find
the most useful.

Also I gave the meaningful proposal of allowing configuration in the hgrc like:

[phases]
private.permit.exchange.localfiles = file://*
private.permit.exchange.myPrivateServer = http://www.myPrivateServer.com/*
private.permit.pull.myCompanyServer = http://www.myCompanyServer.com/*
private.forbid.exchange.others = *

draft.permit.exchange.localflies = file://*
draft.permit.exchange.servers = http://*

publish.permit.exchange.localflies = file://*
publish.permit.exchange.servers = http://*

general form would be:

<phase>.<permit | forbid>.<exchange | pull | push | clone>.<some-unique-name> = spec

Even if it's not the default there needs to be some way to do this. (Once there is
we can argue about what the default should be :) )

Cheers,
   Jason


More information about the Mercurial-devel mailing list