Call for discussion: Phase names

Jason Harris jason at jasonfharris.com
Wed Jan 18 14:08:09 CST 2012


On Jan 18, 2012, at 7:41 PM, Pierre-Yves David wrote:

> 
> On 18 janv. 2012, at 03:31, Jason Harris wrote:
> 
>> I don't get it. If people are worried about the short form typing speed then
>> it's trivial to set up an alias in their hgrc file like:
>> 
>> [alias]
>> phasep = phase --private
> 
> <sarcasm>Yeah! because as phase are only a core concept we don't expect them to show up in any other command than "phase"</sarcasm>
> 
> [alias]
> phasep = phase --private
> phased = phase --draft
> phaseP = phase --public
> pushp = push --private
> pullp = pull --private
> emailp = pull --private
> […


If you want a public version just use p on the end of your alias and then use -p
and -d as normal (for private and draft). (Actually if --private is meant to work
with outgoing, which it should if it works with push, then you already have a
name clash since 'outgoing -p' is already 'outgoing --patch' (same is true for
'incoming -p') so relying on these short forms is problematic. If one really
wants I am sure it's possible to generalize the aliases so that you could say
something like

[alias]
phase -P = phase --private

or something similar, so that user can then assign there own short forms, but in
the end worrying about this unduly is not productive.


But more importantly, beside changing the phase and the push, pull, clone, incoming,
outgoing, are there any other commands that are going to take a phase? If one
really has to actively do lot's of phase management, then the original reason
of, "safety-check-so you-don't-alter changesets which are already pushed to some
public server", looks like it's causing problems. I had gathered that the phase
movement was largely meant to be automatic, right? If it's not and suddenly we
are going to need to be typing --private, --public, --draft, in lots of places
then that seems quite problematic to me.

I tried reading http://mercurial.selenic.com/wiki/Phases#Examples but it's ...
well... not the clearest. At the least instead of phase numbers can we use
public / draft / private words. Also what is with examples like:

A people:Admin push ctx:A to repo:Public (2) A people:Developer pull
ctx:A from repo:Public. The phase:Public boundary move to ctx:A
(3) The same people:Developer push ctx:A to repo:Devel.
The public:Phase boundary move to ctx:A 

	• A.1 MUST be allowed
	• A.2 MUST be allowed
	• A.3 COULD be allowed

Is that meant to read something like:

(The following all deal with the same underlying repository, call it say RudPro)
(1) An admin user Paul pushes changeset A to RudPro hosted on the public server
ShoeBox. (2) A developer Bob pulls A from ShoeBox into his local repository
RudPro. The public phase boundary of Bob's repository RudPro moves to A. (3) Bob
then pushes changeset A to the repository RudPro hosted on the server
DeveloperBox. The public phase boundary of RudPro on DeveloperBox moves to A.

1 Must be allowed
2 Must be allowed
3 Could be allowed.

Could the examples be rewritten in that sort of form? With maybe some expected
commands and their expected outputs? (I have no idea if that is the correct
example since I didn't understand the original.)

Eg I really don't understand:
hg pull into publish == False from publish == True
changegroup IN_PHASE=1
incoming IN_PHASE=0
remote outgoing IN_PHASE=0

Thanks,
   Jas


More information about the Mercurial-devel mailing list