[PATCH 2 of 5] revset: make internal _list() expression remove duplicated revisions

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri May 29 14:43:06 CDT 2015



On 05/29/2015 07:38 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1432446581 -32400
> #      Sun May 24 14:49:41 2015 +0900
> # Node ID 5be635444c0156a6d0688d5ba3688a9a9db7f561
> # Parent  5617fab1b1f1905663bd38053144a93a746f34db
> revset: make internal _list() expression remove duplicated revisions
>
> This allows us to optimize chained 'or' operations to _list() expression.
>
> Unlike _intlist() or _hexlist(), it's difficult to remove duplicates by the
> caller of _list() because different symbols can point to the same revision.
> If the caller knows all symbols are unique, that probably means revisions or
> nodes are known, therefore, _intlist() or _hexlist() should be used instead.
> So, it makes sense to check duplicates by _list() function.
>
> '%ls' is no longer used in core, this won't cause performance regression.

What about we declare the %lX are to be considered "ascending" and we 
throw the whole thing into a set before handing out the result to 
baseset() ?

This is an API change, but we do not have API, do we?

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list