[PATCH 5 of 6] revset: make addset class accepts more than two subsets (issue4565)
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed May 13 00:55:26 UTC 2015
On 05/12/2015 03:59 PM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1426404911 -32400
> # Sun Mar 15 16:35:11 2015 +0900
> # Node ID d15815ca13aec24b6c62d2ec2eebebea52adc411
> # Parent 1ef1b51bba52a6d186fdbc794045eec6b6477be0
> revset: make addset class accepts more than two subsets (issue4565)
>
> This allows us to handle chained OR operations in one addset instance, which
> should greatly reduce the usage of Python stack.
The way most python's API usually work on this aspect is by taking an
arbitrary number of arguments:
>>> max(1, 2, 3, 4, 5, 6)
we could do the same here:
>>> addset(x1, x2)
>>> addset(x1, x2, x3)
what do you think ?
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list