[PATCH RFC] revset: use '%' as an operator for 'only'

Martin von Zweigbergk martinvonz at google.com
Fri Nov 7 00:31:29 CST 2014


On Thu Nov 06 2014 at 2:57:01 PM Sean Farley <sean.michael.farley at gmail.com>
wrote:

> # HG changeset patch
> # User Sean Farley <sean.michael.farley at gmail.com>
> # Date 1415314518 28800
> #      Thu Nov 06 14:55:18 2014 -0800
> # Node ID 752f70bee3b0542ca36b1fecbb70c954d6017061
> # Parent  2d54aa5397cdb1c697673ba10b7618d5ac25c69e
> revset: use '%' as an operator for 'only'
>
> With this patch, we can make it much easier to specify 'only(A,B)' ->
> A%B. Similarly, 'only(A)' -> A%.
>

That would let me send patches with 'hg email -r .%@'. Should the first
argument default to '.' so it's just '%@'?

It seems like only() would be one of the most commonly used revset
operations, so I think it deserves its own operator. I'm not sold on '%',
though. Something that looks more like '-' would be nice, but I don't know
what that would be (I'm tempted to suggest '\\' [1], but that would require
shell escaping).

 [1]
http://hackage.haskell.org/package/base-4.7.0.1/docs/Data-List.html#g:20
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20141107/1c0ec4f4/attachment.html>


More information about the Mercurial-devel mailing list