From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] vc-hg keep working when hg emits warnings Date: Wed, 04 Aug 2010 13:02:28 -0400 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 1280941407 19358 80.91.229.12 (4 Aug 2010 17:03:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2010 17:03:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sascha Wilde Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 04 19:03:24 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 1OghNB-0000c7-Tc for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 19:03:22 +0200 Original-Received: from localhost ([127.0.0.1]:43608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OghNB-0001qB-5X for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 13:03:21 -0400 Original-Received: from [199.232.76.173] (port=41741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OghMM-0001As-Pz for emacs-devel@gnu.org; Wed, 04 Aug 2010 13:02:30 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OghML-0005bp-C8 for emacs-devel@gnu.org; Wed, 04 Aug 2010 13:02:30 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:37255) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OghML-0005bl-5n for emacs-devel@gnu.org; Wed, 04 Aug 2010 13:02:29 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OghMK-000808-G4; Wed, 04 Aug 2010 13:02:28 -0400 In-Reply-To: (Sascha Wilde's message of "Sun\, 01 Aug 2010 18\:35\:55 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:128253 Archived-At: Sascha Wilde writes: > Hi *, > > related to my latest post (regarding hgrc handling): BTW, better send patches to bug-gnu-emacs, they won't get lost that way. > When one works on an hg repository with an .hg/hgrc owned by someone > else, hg emits a warning like: > > 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. Is there a command line flag to turn off this warning? A more robust option would be to change the parser to deal with the warning...