Some initial impressions of phases

Jason Harris jason at
Tue Jan 24 16:15:44 CST 2012

On Jan 24, 2012, at 10:09 PM, Kevin Bullock wrote:

> On Jan 24, 2012, at 2:40 PM, Jason Harris wrote:
>> On Jan 24, 2012, at 8:30 PM, Matt Mackall wrote:
>>> On Tue, 2012-01-24 at 19:25 +0100, Jason Harris wrote:
>>>> Well update can't take a range
>>> Incorrect. Just about all commands now take revsets and thus now
>>> implicitly support ranges.
>> Incorrect. What does it mean to update to a range of revsets? Maybe it means the end
>> of the range, but fundamentally update only updates to a single revision, ie update cannot
>> update to some superposition of revision states :)
> IIRC correctly it updates to the first rev in the set. Just like anything that calls scmutil.revsingle(). The fact that it might confuse you doesn't change the _correctness_ of Matt's statement.

Pedantically correct because it's defined by behavior. Totally semantically incorrect...
And the semantic correctness is what we care about here because it is what influences design.

Update does not semantically work with revision ranges, it's non-sensical. (It might happen
to do something, or some how respond to a revision range but it's not acting on or
representing a range of revisions.) like eg phase when you do hg phase --force --rev 1010:tip --draft, etc.

> Aside: this probably merits a mention in `hg help revsets`; revsets, in turn, probably merit a mention in `hg help revs` and `hg help multirevs`.
>> [salt:.../MacHgClone26] MacHgClone26 1014(1014) $ rhg phase --force --rev 1000:tip draft
>> hg: parse error: can't use draft here
>> [salt:.../MacHgClone26] MacHgClone26 1014(1014) $ rhg phase --force --draft 1000:tip
>> [salt:.../MacHgClone26] MacHgClone26 1014(1014) $ 
>> In any case it appears that form (b) is not accepted.
> …because that should be '--draft', not 'draft'.

Nope. I want 'draft'. Ie I don't want draft to be an option, I want it to be the main argument.
like 'tip' is 'tip' and not '--tip'. eg "update tip" not "update --tip"

>>>> So it seems like revert does report stuff.
>>> It reports non-explicitly mentioned filenames, just like add, addremove,
>>> and commit -A.
>> Just my point. In some cases you get messages. When you are updating phase and
>> it does something a little dangerous like moving the phase boundary in the
>> "wrong" direction then a one line message would be nice to receive…
> ~$ hg init testrepo
> ~$ cd testrepo/
> ~/testrepo$ ls
> ~/testrepo$ echo a>a
> ~/testrepo$ hg ci -Am0
> adding a
> ~/testrepo$ hg log --template '{rev}:{node|short}: {phase} {desc}'
> 0:11d9b533118b: draft 0
> ~/testrepo$ hg phase --secret 0
> no phases changed
> It has such a message. Would you prefer it said it differently?

Nope. I want a message when eg the set phase action successfully moved the phase
frontier in the "wrong" direction like in the following:
[salt:.../MacHgClone23] MacHgClone23 1021(1021) $ rhg phase --force --draft --rev 1015:tip
[salt:.../MacHgClone23] MacHgClone23 1021(1021) $ 


More information about the Mercurial-devel mailing list