[PATCH STABLE V3] revset: mask specific names for named() predicate

Sean Farley sean.michael.farley at gmail.com
Thu Feb 5 00:26:58 CST 2015


FUJIWARA Katsunori writes:

> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1423115149 -32400
> #      Thu Feb 05 14:45:49 2015 +0900
> # Branch stable
> # Node ID 9132a1cbf802d3abbbcddf0f9ee675c3bc67e108
> # Parent  942a5a34b2d0611ab284380fbe45b9bb1897af98
> revset: mask specific names for named() predicate
>
> Before this patch, revset predicate "tag()" and "named('tags')" differ
> from each other, because the former doesn't include "tip" but the
> latter does.
>
> For equivalence, "named('tags')" shouldn't include the revision
> corresponded to "tip". But just removing "tip" from the "tags"
> namespace causes breaking backward compatibility, even though "tip"
> itself is planned to be eliminated, as mentioned below.
>
>     http://selenic.com/pipermail/mercurial-devel/2015-February/066157.html
>
> To mask specific names ("tip" in this case) for "named()" predicate,
> this patch introduces "deprecated" into "namespaces", and makes
> "named()" predicate examine whether each names are masked by the
> namespace, to which they belong.
>
> "named()" will really work correctly after 3.3.1 (see 873eb5db89c8 for
> detail), and fixing this on STABLE before 3.3.1 can prevent initial
> users of "named()" from expecting "named('tags')" to include "tip".
>
> It is reason why this patch is posted for STABLE, even though problem
> itself isn't so serious.
>
> This may have to be flagged as "(BC)", if applied on DEFAULT.

Ok, let me try to pause things here. I think we all agree that the
approach to remove 'tip' from namespaces is the way forward. My question
is on implementation. Part of me likes having the 'deprecated' or
'revsetmask' that you propose.

I don't know what the future holds for the namespaces API but it does
some this is a bit of a big step. My suggestion (looking for feedback)
would be: could we split tags into their own namespaces? e.g.

namespaces['localtags']
namespaces['tags']

and then filter 'tip' from those specially?


More information about the Mercurial-devel mailing list