Submitter | Katsunori FUJIWARA |
---|---|
Date | Aug. 8, 2016, 9:59 a.m. |
Message ID | <697b11a0c95313d8220f.1470650386@juju> |
Download | mbox | patch |
Permalink | /patch/16194/ |
State | Changes Requested |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
Patch
diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -136,7 +136,11 @@ def gettimer(ui, opts=None): opts = {} # redirect all to stderr ui = ui.copy() - ui.fout = ui.ferr + setuifout = safeattrsetter(ui, 'fout', ignoremissing=True) + if setuifout: + # for "historical portability": + # ui.fout/ferr have been available since 1.9 (or 4e1ccd4c2b6d) + setuifout(ui.ferr) # get a formatter uiformatter = getattr(ui, 'formatter', None)