[PATCH 1 of 2 V3] revset: make desc() function accept multiple arguments

Kevin Bullock kbullock+mercurial at ringworld.org
Sat Sep 7 23:24:19 CDT 2013


On 6 Sep 2013, at 4:04 AM, Alexander Plavin wrote:

> # HG changeset patch
> # User Alexander Plavin <alexander at plav.in>
> # Date 1377196193 -14400
> #      Thu Aug 22 22:29:53 2013 +0400
> # Node ID 9058d1306b28dcb57aaa7791924473a86661bef7
> # Parent  cf26d9c918f6f0943f39e8116ca807da1e4e8525
> revset: make desc() function accept multiple arguments
> 
> This provides a more convenient way to express a conjunction of
> multiple desc() calls with single argument.

I'm still pondering whether this is the right way to provide a shorthand. I'm inclined to say that multiple arguments should express _dis_junction ('or') rather than conjunction ('and'). But it's probably going to be confusing no matter which one we pick.

Alternatively, we could provide an 'any(...)' revset as a (sort of) shorthand for ORing all its arguments together. We already have an 'all()' that takes no arguments and means something else, though.

Or maybe the current syntax is just as compact as it's going to get without introducing too much ambiguity. Waiting to hear other people's thoughts.

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



More information about the Mercurial-devel mailing list