commandserver: add experimental option to use separate message channel
This is loosely based on the idea of the TortoiseHg's pipeui extension,
which attaches ui.label to message text so the command-server client can
capture prompt text, for example.
https://bitbucket.org/tortoisehg/thg/src/4.7.2/tortoisehg/util/pipeui.py
I was thinking that this functionality could be generalized to templating,
but changed mind as doing template stuff would be unnecessarily complex.
It's merely a status message, a simple serialization option should suffice.
Since this slightly changes the command-server protocol, it's gated by a
config knob. If the config is enabled, and if it's supported by the server,
"message-encoding: <name>" is advertised so the client can stop parsing
'o'/'e' channel data and read encoded messages from the 'm' channel. As we
might add new message encodings in future releases, client can specify a list
of encoding names in preferred order.
This patch includes 'cbor' encoding as example. Perhaps, 'json' should be
supported as well.
commandserver: fix reference before assignment error in pipeservice cleanup
Spotted by the next patch.
dispatch: pass around ui.fmsg channel
This will be set by the command server. See the next patch.
test-subrepo: document why share magically works even if subrepos are missing
I was confused how it's working while reviewing
fb490d798be0, "share: reload
repo after adjusting it in postshare()."
packaging: add Fedora 29 target
Differential Revision: https://phab.mercurial-scm.org/D5254
test-narrow-clone-stream: include no usefncache case which is broken
Since
9aeb9e2d28a7, encoded filenames are filtered by the narrow matcher,
which is clearly wrong.
test-narrow-clone-stream: include uppercase letter in filename
This makes encoded filenames differ from the original names.
phase: use the `phases.cmdphasenames` constant to walk available command flags
This reverts
1ea6772fb415.
phases: add a list of names usable by the phase command
This is useful in TortoiseHg for example, which has until recently just added
all names in the `phasenames` list to the context menu that changes the phase.
The ones not supported by the command would just error out.
transaction: display data about why the transaction failed to rollback
We saw more of these a while back. Having more data available would be nice.