diff -r cb0e28d61905 -r 651d7548a744 contrib/revsetbenchmarks.py --- a/contrib/revsetbenchmarks.py Mon May 19 14:39:19 2014 -0700 +++ b/contrib/revsetbenchmarks.py Tue Apr 29 13:18:22 2014 -0700 @@ -14,6 +14,7 @@ # to compare performance. import sys +import os from subprocess import check_call, Popen, CalledProcessError, STDOUT, PIPE # cannot use argparse, python 2.7 only from optparse import OptionParser @@ -42,7 +43,8 @@ try: output = check_output(['./hg', '--config', - 'extensions.perf=contrib/perf.py', + 'extensions.perf=' + + os.path.join(contribdir, 'perf.py'), 'perfrevset', revset], stderr=STDOUT) @@ -79,6 +81,8 @@ parser.print_help() sys.exit(255) +# the directory where both this script and the perf.py extension live. +contribdir = os.path.dirname(__file__) target_rev = args[0]