From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sascha Wilde Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] vc-hg keep working when hg emits warnings Date: Wed, 04 Aug 2010 19:16:01 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280942678 24275 80.91.229.12 (4 Aug 2010 17:24:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2010 17:24:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 04 19:24:35 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oghhi-0004Pc-Or for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 19:24:35 +0200 Original-Received: from localhost ([127.0.0.1]:48875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oghhi-0001wK-4J for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 13:24:34 -0400 Original-Received: from [140.186.70.92] (port=54688 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OghZZ-0000Py-0p for emacs-devel@gnu.org; Wed, 04 Aug 2010 13:16:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OghZX-0001CL-Vo for emacs-devel@gnu.org; Wed, 04 Aug 2010 13:16:08 -0400 Original-Received: from mail2.sha-bang.de ([78.47.120.114]:33109 helo=mail.sha-bang.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OghZU-0001BO-8k; Wed, 04 Aug 2010 13:16:04 -0400 Original-Received: from kenny.lan.sha-bang.de (xdslu148.osnanet.de [82.149.184.148]) by mail.sha-bang.de (Postfix) with ESMTPSA id 93F0F565; Wed, 4 Aug 2010 19:16:01 +0200 (CEST) Original-Received: from wilde by kenny.lan.sha-bang.de with local (Sha Bang MUA v.0711184.68) ID 1OghZR-0007tq-7K; Wed, 04 Aug 2010 19:16:01 +0200 In-Reply-To: (Dan Nicolaescu's message of "Wed, 04 Aug 2010 13:02:28 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128255 Archived-At: Dan Nicolaescu wrote: > Sascha Wilde 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)