Patchwork [2,of,7] revsetbenchmarks: add various examples around the 'heads()' revset

login
register
mail settings
Submitter Boris Feld
Date Jan. 15, 2019, 7:33 p.m.
Message ID <0c8eb4ed3b0f0294f2cb.1547580801@localhost.localdomain>
Download mbox | patch
Permalink /patch/37758/
State Accepted
Headers show

Comments

Boris Feld - Jan. 15, 2019, 7:33 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1547414651 -3600
#      Sun Jan 13 22:24:11 2019 +0100
# Node ID 0c8eb4ed3b0f0294f2cb2d328ffce70847489be9
# Parent  d028a9425f028b02f5cff34683c472a14ff8d8d7
# EXP-Topic revset.predicates
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0c8eb4ed3b0f
revsetbenchmarks: add various examples around the 'heads()' revset

We are about to work on the performance of this revset. Before doing so we
defines various ways to use it.

Patch

diff --git a/contrib/all-revsets.txt b/contrib/all-revsets.txt
--- a/contrib/all-revsets.txt
+++ b/contrib/all-revsets.txt
@@ -139,3 +139,11 @@  secret()
 # test finding common ancestors
 heads(commonancestors(last(head(), 2)))
 heads(commonancestors(head()))
+
+# more heads testing
+heads(all())
+heads(-10000:-1)
+(-5000:-1000) and heads(-10000:-1)
+heads(matching(tip, "author"))
+heads(matching(tip, "author")) and -10000:-1
+(-10000:-1) and heads(matching(tip, "author"))