Mercurial > hg-stable
changeset 25543:36336cc8cfab
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))`.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 09 Jun 2015 23:45:34 -0700 |
parents | 6d937c49d935 |
children | e66f1707ba6c |
files | contrib/revsetbenchmarks.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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>")