diff -r 4533f5b47949 -r 3b5389ef5cfe contrib/perf.py --- a/contrib/perf.py Tue Jul 05 07:25:51 2016 +0900 +++ b/contrib/perf.py Tue Jul 05 07:25:51 2016 +0900 @@ -39,6 +39,14 @@ util, ) +# for "historical portability": +# define util.safehasattr forcibly, because util.safehasattr has been +# available since 1.9.3 (or 94b200a11cf7) +_undefined = object() +def safehasattr(thing, attr): + return getattr(thing, attr, _undefined) is not _undefined +setattr(util, 'safehasattr', safehasattr) + formatteropts = commands.formatteropts revlogopts = commands.debugrevlogopts