How hg signals error and aux messages
Idan Kamara
idankk86 at gmail.com
Tue Jan 29 15:45:03 UTC 2013
(please don't top-post)
On Tue, Jan 29, 2013 at 5:25 PM, Jan Vrany <jan.vrany at fit.cvut.cz> wrote:
>
> Yes, I've read this, but unfortunately I haven't found answers
> to following questions:
>
>
> - Is an error alwyas indicated by a line to stderr (or error channel)
> starting with 'abort: '?
It should. But the return value should be your main indication
for success.
> - Is an error always indicated on stderr (or error channel) before
> command output?
Depends on the command, but usually the errors are at the end
and nothing follows on stdout.
> - Where are auxiliary messages such as 'invalidating branch cache (tip
> differs') written?
Depending on the message these can go to either stdout
or stderr, and can be controlled with the verbose or quiet
flags.
>
> Also, I haven't found command's output "grammar" - how the output
> (stdout or 'o'utput channel) of an hg merge command (for instance)
> look like.
Some of these are in the style files, but others aren't
documented anywhere.
>
> Actually, I do have a feeling and my brief experiments shows,
> that command server solves only the problem of startup (and
> maybe language neutrality) and does not specify the output of
> individual HG commands like merge, push, update. Am I wrong?
No, but it's not suppose to solve those problems. It simply
forwards the data that Mercurial normally outputs in channels.
Customizing output is available in some commands via the
'--template' argument. Other commands have a fixed structure
that shouldn't change much between versions, and could of
course benefit scripting by supporting templates.
http://mercurial.selenic.com/wiki/GenericTemplatingPlan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130129/5aba77bf/attachment-0002.html>
More information about the Mercurial
mailing list