[PATCH 3 of 3] revset: drop factory that promotes spanset to fullreposet

Yuya Nishihara yuya at tcha.org
Thu May 14 18:01:19 CDT 2015


On Wed, 13 May 2015 22:58:16 -0700, Pierre-Yves David wrote:
> On 05/06/2015 02:00 AM, Yuya Nishihara wrote:
> > On Wed, 06 May 2015 00:11:50 -0700, Pierre-Yves David wrote:
> >> On related topic, one what behavior did we settle regarding usage of
> >> "null" in revset? I cannot find anything related to this discussion in
> >> mercurial/revset.py
> >
> > Not sure if it's settled. My starting point was to fix buggy handling of
> > "null" in revset.
> >
> > http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/75134/focus=75148
> 
> We should probably discuss this, decide on a behavior, document it and 
> stick to it. I cannot access the gmane thread for some reason :-/. Do 
> you have another pointer to this messages?
> 
> My current opinions is:
> 
> - null should work when explicitly referenced
> - null should not survive combination (and) with anything.

I agree with the bullet point 1, but my opinion for 2 is:

- null should work just like other revisions once appeared

> In practice this means
> 
> 1) The following include null in the result
> - "null"
> - "null + 2"
> - "null::" (probably)
> - "::null" (probably)
> 
> 2) the following does not includes it
> - "null and (::2)"
> - "null and date(-9001)"
> - "null and all()"
> (replaces null by any of the variant in (1))
>
> Same should probably apply to the "working directory" revset.
> "all()" could maybe take and argument to accept null.

- "null and (:2)" -> ()       # because :2 = 0:2
- "null and (::2)" -> (null,)
- "null and date(-100000)" -> (null,)
- "null and all()" -> ()      # if all() = 0:tip
                   or (null)  # if all() = everything in sets (like "and true")
- "wdir() and draft()" -> (wdir,)

Regards,


More information about the Mercurial-devel mailing list