# HG changeset patch # User Pierre-Yves David # Date 2015-06-10 06:45:34 # Node ID 36336cc8cfab1d88bffff3ae876d4b5a14dfc932 # Parent 6d937c49d935cfac3a688b87e4e725af0c834fe1 revsetbenchmarks: support combining variants with "+" We need more advanced variants in some cases. For example, "The last rev of the sorted version". We introduce a syntax for this: `reverse+last` means `last(reverse(REVSET))`. diff --git a/contrib/revsetbenchmarks.py b/contrib/revsetbenchmarks.py --- a/contrib/revsetbenchmarks.py +++ b/contrib/revsetbenchmarks.py @@ -202,7 +202,9 @@ def getrevs(spec): def applyvariants(revset, variant): if variant == 'plain': return revset - return '%s(%s)' % (variant, revset) + for var in variant.split('+'): + revset = '%s(%s)' % (var, revset) + return revset parser = OptionParser(usage="usage: %prog [options] ")