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

Boris Feld boris.feld at octobus.net
Tue Jan 15 14:33:21 EST 2019


# HG changeset patch
# User Boris Feld <boris.feld at 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.

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"))


More information about the Mercurial-devel mailing list