diff mercurial/statprof.py @ 30845:262c2be8ea5a stable

statprof: require input file statprof has a __main__ handler that allows viewing of previously written data files. As Yuya pointed out during review, f42cd5434cc2 broke this. This patch fixes that.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 18 Jan 2017 22:45:07 -0800
parents 344e68882cd3
children be3a4fde38eb
line wrap: on
line diff
--- a/mercurial/statprof.py	Wed Jan 18 23:43:41 2017 -0500
+++ b/mercurial/statprof.py	Wed Jan 18 22:45:07 2017 -0800
@@ -800,6 +800,10 @@
         else:
             assert False, "unhandled option %s" % o
 
+    if not path:
+        print('must specify --file to load')
+        return 1
+
     load_data(path=path)
 
     display(**displayargs)