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))`.
--- a/contrib/revsetbenchmarks.py Tue Jun 09 21:10:44 2015 -0700
+++ b/contrib/revsetbenchmarks.py Tue Jun 09 23:45:34 2015 -0700
@@ -202,7 +202,9 @@
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] <revs>")