Some initial impressions of phases

Kevin Bullock kbullock+mercurial at ringworld.org
Tue Jan 24 15:09:42 CST 2012


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.

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'.

>>> 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?

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list