[PATCH 2 of 4] revset: remove useless code to reorder weights of 'or' expression
yuya at tcha.org
Tue May 26 17:54:48 CDT 2015
On Tue, 26 May 2015 11:14:27 -0500, Matt Mackall wrote:
> 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.
Hmm, but doesn't it change the order of the result set?
I think "sort(A + B)" == "sort(B + A)", but "A + B" != "B + A".
More information about the Mercurial-devel