diff -r 6146d5acee69 -r c6ce11f2ee50 mercurial/statprof.py --- a/mercurial/statprof.py Tue Dec 06 11:44:49 2016 +0000 +++ b/mercurial/statprof.py Tue Dec 06 06:36:36 2016 +0530 @@ -116,6 +116,10 @@ import threading import time +from . import ( + pycompat, +) + defaultdict = collections.defaultdict contextmanager = contextlib.contextmanager @@ -771,7 +775,7 @@ # process options try: - opts, args = getopt.getopt(sys.argv[optstart:], "hl:f:o:p:", + opts, args = pycompat.getoptb(sys.argv[optstart:], "hl:f:o:p:", ["help", "limit=", "file=", "output-file=", "script-path="]) except getopt.error as msg: print(msg)