##// END OF EJS Templates
ui: add ui.write() output labeling API...
ui: add ui.write() output labeling API This adds output labeling support with the following methods: - ui.write(..., label='topic.name topic2.name2 ...') - ui.write_err(.., label=...) - ui.popbuffer(labeled=False) - ui.label(msg, label) By adding an API to label output directly, the color extension can forgo parsing command output and instead override the above methods to insert ANSI color codes. GUI tools can also override the above methods and use the labels to do GUI-specific styling. popbuffer gains a labeled argument that, when set to True, returns its buffered output with labels handled. In the case of the color extension, this would return output with color codes embedded. For existing users that use this method to capture and parse output, labels are discarded and output returned as normal when labeled is False (the default). Existing wrappers of ui.write() and ui.write_err() should make sure to accept its new **opts argument.
Brodie Rao -
r10815:32b213b9 default
Show More
Name Size Modified Last Commit Author
/ mercurial
help
hgweb
pure
templates
__init__.py Loading ...
ancestor.py Loading ...
archival.py Loading ...
base85.c Loading ...
bdiff.c Loading ...
bundlerepo.py Loading ...
byterange.py Loading ...
changegroup.py Loading ...
changelog.py Loading ...
cmdutil.py Loading ...
commands.py Loading ...
config.py Loading ...
context.py Loading ...
copies.py Loading ...
demandimport.py Loading ...
diffhelpers.c Loading ...
dirstate.py Loading ...
dispatch.py Loading ...
encoding.py Loading ...
error.py Loading ...
extensions.py Loading ...
fancyopts.py Loading ...
filelog.py Loading ...
filemerge.py Loading ...
graphmod.py Loading ...
hbisect.py Loading ...
help.py Loading ...
hg.py Loading ...
hook.py Loading ...
httprepo.py Loading ...
i18n.py Loading ...
ignore.py Loading ...
keepalive.py Loading ...
localrepo.py Loading ...
lock.py Loading ...
lsprof.py Loading ...
lsprofcalltree.py Loading ...
mail.py Loading ...
manifest.py Loading ...
match.py Loading ...
mdiff.py Loading ...
merge.py Loading ...
minirst.py Loading ...
mpatch.c Loading ...
node.py Loading ...
osutil.c Loading ...
parsers.c Loading ...
patch.py Loading ...
posix.py Loading ...
repair.py Loading ...
repo.py Loading ...
revlog.py Loading ...
simplemerge.py Loading ...
sshrepo.py Loading ...
sshserver.py Loading ...
statichttprepo.py Loading ...
store.py Loading ...
streamclone.py Loading ...
strutil.py Loading ...
subrepo.py Loading ...
tags.py Loading ...
templatefilters.py Loading ...
templatekw.py Loading ...
templater.py Loading ...
transaction.py Loading ...
ui.py Loading ...
url.py Loading ...
util.py Loading ...
verify.py Loading ...
win32.py Loading ...
windows.py Loading ...