changeset 25529:3e80691d0dfe

revsetbenchmarks: improve error output in case of failure This helps with diagnostics.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 09 Jun 2015 15:58:48 -0700
parents a6bcd70cd9c2
children 94efef10b63f
files contrib/revsetbenchmarks.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/revsetbenchmarks.py	Tue Jun 09 15:49:14 2015 -0700
+++ b/contrib/revsetbenchmarks.py	Tue Jun 09 15:58:48 2015 -0700
@@ -57,7 +57,11 @@
         output = output.lstrip('!') # remove useless ! in this context
         return output.strip()
     except CalledProcessError, exc:
-        print >> sys.stderr, 'abort: cannot run revset benchmark'
+        print >> sys.stderr, 'abort: cannot run revset benchmark: %s' % exc.cmd
+        if exc.output is None:
+            print >> sys.stderr, '(no ouput)'
+        else:
+            print >> sys.stderr, exc.output
         sys.exit(exc.returncode)
 
 def printrevision(rev):