tests/test-ui-color.py
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
Sun, 10 Oct 2010 09:50:25 -0500
changeset 12757 62c8f7691bc3
parent 11732 386e56ecfb78
child 12865 4c50552fc9bc
permissions -rw-r--r--
merge: make 'diverging renames' diagnostic a more helpful note. See the Hg Book on why we actually want to detect this case: http://hgbook.red-bean.com/read/mercurial-in-daily-use.html#id364290 Before: $ hg up deadbeef warning: detected divergent renames of X to: ... After: $ hg up deadbeef note: possible conflict - X was renamed multiple times to: ... No functionality change.

#!/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())