unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sascha Wilde <wilde@sha-bang.de>
To: Dan Nicolaescu <dann@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] vc-hg keep working when hg emits warnings
Date: Wed, 04 Aug 2010 19:16:01 +0200	[thread overview]
Message-ID: <m24ofa5mem.fsf@kenny.lan.sha-bang.de> (raw)
In-Reply-To: <yxqd3tycnvf.fsf@fencepost.gnu.org> (Dan Nicolaescu's message of "Wed, 04 Aug 2010 13:02:28 -0400")

Dan Nicolaescu <dann@gnu.org> wrote:
> Sascha Wilde <wilde@sha-bang.de> 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	other threads:[~2010-08-04 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-01 16:35 [PATCH] vc-hg keep working when hg emits warnings Sascha Wilde
2010-08-04 17:02 ` Dan Nicolaescu
2010-08-04 17:16   ` Sascha Wilde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24ofa5mem.fsf@kenny.lan.sha-bang.de \
    --to=wilde@sha-bang.de \
    --cc=dann@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).