contrib/perf.py
changeset 29496 7299370cf304
parent 29495 f83445296213
child 29497 ee2027195847
--- a/contrib/perf.py	Tue Jul 05 07:25:51 2016 +0900
+++ b/contrib/perf.py	Tue Jul 05 07:25:51 2016 +0900
@@ -48,7 +48,12 @@
     return getattr(thing, attr, _undefined) is not _undefined
 setattr(util, 'safehasattr', safehasattr)
 
-formatteropts = commands.formatteropts
+# for "historical portability":
+# use locally defined empty option list, if formatteropts isn't
+# available, because commands.formatteropts has been available since
+# 3.2 (or 7a7eed5176a4), even though formatting itself has been
+# available since 2.2 (or ae5f92e154d3)
+formatteropts = getattr(commands, "formatteropts", [])
 
 # for "historical portability":
 # use locally defined option list, if debugrevlogopts isn't available,