[PATCH] revset: add exclusive revset
Martin Geisler
martin at geisler.net
Wed Nov 20 09:59:10 UTC 2013
Durham Goode <durham at fb.com> writes:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1384575318 28800
> # Fri Nov 15 20:15:18 2013 -0800
> # Node ID 029191a9eb775c586ed02c201d0c555053ea44da
> # Parent aa80446aacc3b1574211649cd8f190250b6b04b3
> revset: add exclusive revset
>
> Adds a exclusive revset that has two forms:
>
> exclusive(<set>) is equivalent to "::<set> - ::(heads() - <set>)"
>
> exclusive(<include>,<exclude>) is equivalent to "::<include> - ::<exclude>"
>
> On a large repo, this implementation can process/traverse 50,000 revs in 0.7
> seconds, versus 4.2 seconds using "::<include> - ::<exclude>".
Very nice!
Since it sounds like the new revset computes the exact same result as
"::<include> - ::<exclude>", do you think we could let the revset
optimizer recognize "::<include> - ::<exclude>" and turn it into the new
revset automatically?
--
Martin Geisler
More information about the Mercurial-devel
mailing list