emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vc-hg keep working when hg emits warnings


From: Sascha Wilde
Subject: Re: [PATCH] vc-hg keep working when hg emits warnings
Date: Wed, 04 Aug 2010 19:16:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Dan Nicolaescu <address@hidden> wrote:
> Sascha Wilde <address@hidden> writes:
>> Not trusting file /home/foo/argh/.hg/hgrc from untrusted user foo, group foo
>>
>> on stderr.[1]
>>
>> Despite the warning hg still works as expected (ignoring the
>> repositories hgrc).  So ignoring the warning is TRTTD for Emacs.
>> Currently the warning text confuses vc, so that certain commands and the
>> revision display in the status bare don't work correctly.
>>
>> The following patch achieves this by simply ignoring all output on
>> stderr for vc-hg-state and vc-hg-working-revision.
>>
>> This might seem a little brute force, but its the most simple solution
>> and I believe it should be free of unwanted side effects:
>
> IMHO this is not good, there might be other reasons for hg to give
> warnings, and the user would have no way to find out about it.

As there currently is no handling of warning or error messages at all,
the user has no sensible way to find out about them at the moment.
Reading parts of there messages (the whole wont fit in most cases) in
the place of the revision number in the status bar is no "solution"
worth keeping IMO.

> Is there a command line flag to turn off this warning?

Unfortunately, no.  This was my thirst idea, too...

> A more robust option would be to change the parser to deal with the warning...

I fully agree.  But until this is implemented I still think that my
simple patch provides an improvement over the current situation.  As
currently vc-hg stops working in a perfectly regular situation.

cheers
sascha
-- 
Sascha Wilde : "Der Nicht-Denkende glaubt, dass niemand denkt,
             : der Denkende weiss es!"
             : (Gabriel Laub)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]