From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative? Date: Wed, 11 Oct 2006 14:28:03 -0400 Message-ID: References: <17706.64279.627316.725306@gargle.gargle.HOWL> <17708.61845.863249.25290@gargle.gargle.HOWL> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160591522 3303 80.91.229.2 (11 Oct 2006 18:32:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2006 18:32:02 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 11 20:31:57 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GXiox-0003L9-DP for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2006 20:28:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXiow-0008WV-SI for ged-emacs-devel@m.gmane.org; Wed, 11 Oct 2006 14:28:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXiod-0008RK-6M for emacs-devel@gnu.org; Wed, 11 Oct 2006 14:28:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXiob-0008Nf-Jn for emacs-devel@gnu.org; Wed, 11 Oct 2006 14:28:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXiob-0008NO-8M for emacs-devel@gnu.org; Wed, 11 Oct 2006 14:28:25 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXiwe-0002pv-Ic for emacs-devel@gnu.org; Wed, 11 Oct 2006 14:36:44 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 7AB912CF111; Wed, 11 Oct 2006 14:28:22 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 1F48D3FE1; Wed, 11 Oct 2006 14:28:04 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 0735A6C9B2; Wed, 11 Oct 2006 14:28:03 -0400 (EDT) Original-To: raman@users.sf.net In-Reply-To: <17708.61845.863249.25290@gargle.gargle.HOWL> (T. V. Raman's message of "Wed\, 11 Oct 2006 06\:28\:53 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca 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:60611 Archived-At: > Consider an environment where your home dir (and all users home > dirs) come from nfs and are visible as /home/user Hmm... now that I look at the code I see that the optimization I had put for this common case is actually missing. Can you try the patch below, see if it helps? Stefan --- orig/lisp/vc-hooks.el +++ mod/lisp/vc-hooks.el @@ -52,11 +52,13 @@ (defvar vc-header-alist ()) (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header) -(defvar vc-ignore-dir-regexp "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'" - "Regexp matching directory names that are not under VC's control. +(defcustom vc-ignore-dir-regexp "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'" + "Regexp matching directory names that are not under VC's control. The default regexp prevents fruitless and time-consuming attempts to determine the VC status in directories in which filenames are -interpreted as hostnames.") +interpreted as hostnames." + :type 'regexp + :group 'vc) (defcustom vc-handled-backends '(RCS CVS SVN SCCS Arch MCVS) ;; Arch and MCVS come last because they are per-tree rather than per-dir. @@ -308,6 +310,9 @@ "Find the root of a checked out project. The function walks up the directory tree from FILE looking for WITNESS. If WITNESS if not found, return nil, otherwise return the root." + ;; Represent /home/luser/foo as ~/foo so that we don't try to look for + ;; witnesses in /home or in /. + (setq file (abbreviate-file-name file)) (let ((root nil)) (while (not (or root (equal file (setq file (file-name-directory file)))