How hg signals error and aux messages

Idan Kamara idankk86 at gmail.com
Wed Jan 30 08:30:07 UTC 2013


On Tue, Jan 29, 2013 at 6:13 PM, Jan Vrany <jan.vrany at fit.cvut.cz> wrote:
>>
>>  > - 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?

There's no one actively working on this AFAIK. But this
should be fairly easy to get into if you're interested.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130130/70c1ff77/attachment-0002.html>


More information about the Mercurial mailing list