Mercurial > public > mercurial-scm > hg
comparison mercurial/commandserver.py @ 40590:83dd8c63a0c6
ui: extract helpers to write message with type or label
This provides a 'type' attribute to command-server clients, which seems
more solid than relying on 'ui.<type>' labels. In future patches,
type='progress' will be added to send raw progress information.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Jan 2015 17:55:28 +0900 |
parents | 054d0fcba2c4 |
children | 234c2d8c9e48 |
comparison
equal
deleted
inserted
replaced
40589:054d0fcba2c4 | 40590:83dd8c63a0c6 |
---|---|
76 """ | 76 """ |
77 Write encoded message and metadata to out in the following format: | 77 Write encoded message and metadata to out in the following format: |
78 | 78 |
79 data length (unsigned int), | 79 data length (unsigned int), |
80 encoded message and metadata, as a flat key-value dict. | 80 encoded message and metadata, as a flat key-value dict. |
81 | |
82 Each message should have 'type' attribute. Messages of unknown type | |
83 should be ignored. | |
81 """ | 84 """ |
82 | 85 |
83 # teach ui that write() can take **opts | 86 # teach ui that write() can take **opts |
84 structured = True | 87 structured = True |
85 | 88 |