Comments
Patch
@@ -30,7 +30,9 @@ def safehasattr(thing, attr):
return getattr(thing, attr, _undefined) is not _undefined
setattr(util, 'safehasattr', safehasattr)
-formatteropts = commands.formatteropts
+# commands.formatteropts has been available since 3.2 (or 7a7eed5176a4),
+# but formatting itself has been available since 2.2 (or ae5f92e154d3)
+formatteropts = getattr(commands, "formatteropts", [])
# commands.debugrevlogopts has been available since 3.7 (or 5606f7d0d063),
# but cmdutil.openrevlog() has been available since 1.9 (or a79fea6b3e77)