##// END OF EJS Templates
py3: flush stdout...
Gregory Szorc -
r40236:9cc41195 default
parent child Browse files
Show More
@@ -117,11 +117,14 b' profiler extension could be loaded befor'
117 $ cat > fooprof.py <<EOF
117 $ cat > fooprof.py <<EOF
118 > from __future__ import absolute_import
118 > from __future__ import absolute_import
119 > import contextlib
119 > import contextlib
120 > import sys
120 > @contextlib.contextmanager
121 > @contextlib.contextmanager
121 > def profile(ui, fp):
122 > def profile(ui, fp):
122 > print('fooprof: start profile')
123 > print('fooprof: start profile')
124 > sys.stdout.flush()
123 > yield
125 > yield
124 > print('fooprof: end profile')
126 > print('fooprof: end profile')
127 > sys.stdout.flush()
125 > def extsetup(ui):
128 > def extsetup(ui):
126 > ui.write(b'fooprof: loaded\n')
129 > ui.write(b'fooprof: loaded\n')
127 > EOF
130 > EOF
General Comments 0
You need to be logged in to leave comments. Login now