How hg signals error and aux messages

Jan Vrany jan.vrany at fit.cvut.cz
Tue Jan 29 16:13:15 UTC 2013


>  > - 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.
>
Indeed.

>  > - 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.
>

OK, thanks.

>  >
>  > 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

Yes, I do use templates where I can. Having them everywhere would
definitely help a lot. Any guesses when this might be ready?

Jan





More information about the Mercurial mailing list