phase revset and property name (was RFC: Phase UI (revset, phase command and others))

Matt Mackall mpm at selenic.com
Tue Jan 3 14:20:29 CST 2012


On Tue, 2012-01-03 at 19:47 +0100, Pierre-Yves David wrote:
> On Tue, Jan 03, 2012 at 12:36:51PM -0600, Matt Mackall wrote:
> > On Tue, 2012-01-03 at 09:50 +0100, Pierre-Yves David wrote:
> > > On 2 janv. 2012, at 20:00, Matt Mackall wrote:
> > > 
> > > >>> But yes, I think we need attribute predicates.
> > > >> 
> > > >> the idea is to provided simple way to say "phaseN() or phaseN+1()". From this point of view, usefull symbol are:
> > > >> 
> > > >>    shared() == public() + draft() == not secret()
> > > >>    mutable() == draft() + secret() == not public()
> > > > 
> > > > What I don't see an answer to is:
> > > > 
> > > >> Also exchanged is a <= operation while mutable is a >= operation.
> > > > 
> > > > shared = (phase < 2)
> > > > mutable = (phase > 1)
> > > 
> > > People will both want to express < and > operation.
> > > I expect negation negation on revset symbol be much less efficient for certain operation.
> > >
> > > 	(eg, not public() vs mutable())
> > 
> > I think it will be hard to measure a difference.
> 
> In mercurial-core public() if 15K changeset big while mutable() should be less
> that hundred. I think it worth some benchmarking.

Given that the phase set is stored as roots (ie implicit descendant
operation), then it should be a simple matter of set negation.

I now think we should just stick with phase predicates in revsets for
simplicity. As there are only three at present, every set of two is
readily available as the negation of the third.

> As you are the final judge on such topic it would help that you rephase your
> exigence so we can start a positive suggestion cycle on this topic.

If we're going to visibly name the columns/attributes, then I think they
need to all be consistently of the form "foo() means phase is >= N" or
"foo() means phase is <= N". So that means (<some word meaning mutable>
and <some word meaning not remotely visible>) or (<some word meaning
immutable> and <some word meaning remotely visible>).

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list