mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
6d1ff05d76
Without this fix, any calls to write_err would go to stdout instead of stderr, and calls during pushbuffer would cause unpack ValueErrors on popbuffer.
12 lines
236 B
Python
12 lines
236 B
Python
#!/usr/bin/env python
|
|
|
|
from hgext import color
|
|
|
|
# ensure errors aren't buffered
|
|
testui = color.colorui()
|
|
testui.pushbuffer()
|
|
testui.write('buffered\n')
|
|
testui.warn('warning\n')
|
|
testui.write_err('error\n')
|
|
print repr(testui.popbuffer())
|