Patchwork revsetbenchmark: track some simple use of "only"

login
register
mail settings
Submitter Pierre-Yves David
Date April 27, 2019, 12:44 a.m.
Message ID <1029dde2db77dd880cb9.1556325886@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39840/
State Accepted
Headers show

Comments

Pierre-Yves David - April 27, 2019, 12:44 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1548338595 18000
#      Thu Jan 24 09:03:15 2019 -0500
# Node ID 1029dde2db77dd880cb970b8dadb025f04925aee
# Parent  5997eabc7b85f764a57fc55333dea099fc2ab1d4
# EXP-Topic revset.only
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 1029dde2db77
revsetbenchmark: track some simple use of "only"

The only revset is quite useful and has various possible optimisation. tracking
its timing seems useful.
Pulkit Goyal - April 27, 2019, 10:14 a.m.
On Sat, Apr 27, 2019 at 12:26 PM Pierre-Yves David <
pierre-yves.david@ens-lyon.org> wrote:

> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1548338595 18000
> #      Thu Jan 24 09:03:15 2019 -0500
> # Node ID 1029dde2db77dd880cb970b8dadb025f04925aee
> # Parent  5997eabc7b85f764a57fc55333dea099fc2ab1d4
> # EXP-Topic revset.only
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 1029dde2db77
> revsetbenchmark: track some simple use of "only"
>
> The only revset is quite useful and has various possible optimisation.
> tracking
> its timing seems useful.
>

Queued this, many thanks!

Patch

diff --git a/contrib/all-revsets.txt b/contrib/all-revsets.txt
--- a/contrib/all-revsets.txt
+++ b/contrib/all-revsets.txt
@@ -154,3 +154,6 @@  roots(-10000:-1)
 roots(matching(tip, "author"))
 roots(matching(tip, "author")) and -10000:-1
 (-10000:-1) and roots(matching(tip, "author"))
+only(max(head()))
+only(max(head()), min(head()))
+only(max(head()), limit(head(), 1, 1))