##// END OF EJS Templates
perf: omit copying ui and redirect to ferr if buffer API is in use...
Philippe Pepiot -
r30405:e77e8876 default
parent child Browse files
Show More
@@ -136,13 +136,14 b' def gettimer(ui, opts=None):'
136
136
137 if opts is None:
137 if opts is None:
138 opts = {}
138 opts = {}
139 # redirect all to stderr
139 # redirect all to stderr unless buffer api is in use
140 ui = ui.copy()
140 if not ui._buffers:
141 uifout = safeattrsetter(ui, 'fout', ignoremissing=True)
141 ui = ui.copy()
142 if uifout:
142 uifout = safeattrsetter(ui, 'fout', ignoremissing=True)
143 # for "historical portability":
143 if uifout:
144 # ui.fout/ferr have been available since 1.9 (or 4e1ccd4c2b6d)
144 # for "historical portability":
145 uifout.set(ui.ferr)
145 # ui.fout/ferr have been available since 1.9 (or 4e1ccd4c2b6d)
146 uifout.set(ui.ferr)
146
147
147 # get a formatter
148 # get a formatter
148 uiformatter = getattr(ui, 'formatter', None)
149 uiformatter = getattr(ui, 'formatter', None)
General Comments 0
You need to be logged in to leave comments. Login now