[PATCH 2 of 4] revset: remove useless code to reorder weights of 'or' expression

Matt Mackall mpm at selenic.com
Tue May 26 11:14:27 CDT 2015


On Wed, 2015-05-27 at 00:00 +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1430040452 -32400
> #      Sun Apr 26 18:27:32 2015 +0900
> # Node ID 70591283d99dcc442f0e7bdb9afa603eb18bfac1
> # Parent  3c41bb6a51f96c0e4409f6b21689f61c16e149b2
> revset: remove useless code to reorder weights of 'or' expression
> 
> Perhaps there was copy-paste error.

There's an error here, but this is not the fix.

If we have an expression like

 "contains('set:grep(keyword)') or branch(default)"

..we can optimize this expression by finding everything on branch(foo)
first before grepping every file in every revision.

So if wb > wa, we should swap a and b.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list