From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "T. V. Raman" Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative? Date: Thu, 12 Oct 2006 18:31:06 -0700 Message-ID: <17710.60506.308832.146655@gargle.gargle.HOWL> References: <17706.64279.627316.725306@gargle.gargle.HOWL> <17708.61845.863249.25290@gargle.gargle.HOWL> Reply-To: raman@users.sf.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160703104 30458 80.91.229.2 (13 Oct 2006 01:31:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2006 01:31:44 +0000 (UTC) Cc: raman@users.sf.net, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 13 03:31:40 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 1GYBte-0003vm-GT for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 03:31:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYBtd-0000P6-Vo for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2006 21:31:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYBtM-0000N1-Vp for emacs-devel@gnu.org; Thu, 12 Oct 2006 21:31:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYBtL-0000MX-K3 for emacs-devel@gnu.org; Thu, 12 Oct 2006 21:31:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYBtL-0000MS-Dx for emacs-devel@gnu.org; Thu, 12 Oct 2006 21:31:15 -0400 Original-Received: from [204.127.225.91] (helo=alnrmhc11.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GYC1g-0008L7-Mk for emacs-devel@gnu.org; Thu, 12 Oct 2006 21:39:52 -0400 Original-Received: from localhost (c-71-202-191-236.hsd1.ca.comcast.net[71.202.191.236]) by comcast.net (alnrmhc11) with ESMTP id <20061013013110b11008bv7de>; Fri, 13 Oct 2006 01:31:14 +0000 Original-Received: by localhost (Postfix, from userid 1000) id 3644112A4002; Thu, 12 Oct 2006 18:31:08 -0700 (PDT) Original-To: monnier@iro.umontreal.ca In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.3 x-attribution: tvr 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:60696 Archived-At: Your patch appears to work. However it is still more efficient in my environment to prune out arch and mcvs --- >>>>> "Stefan" == Stefan Monnier writes: >> Consider an environment where your home dir (and all users >> home dirs) come from nfs and are visible as /home/user Stefan> Stefan> Hmm... now that I look at the code I see that the Stefan> optimization I had put for this common case is Stefan> actually missing. Can you try the patch below, see Stefan> if it helps? Stefan> Stefan> Stefan> Stefan Stefan> Stefan> Stefan> --- orig/lisp/vc-hooks.el +++ mod/lisp/vc-hooks.el @@ Stefan> -52,11 +52,13 @@ (defvar vc-header-alist ()) Stefan> (make-obsolete-variable 'vc-header-alist Stefan> 'vc-BACKEND-header) Stefan> Stefan> -(defvar vc-ignore-dir-regexp Stefan> "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'" - "Regexp Stefan> matching directory names that are not under VC's Stefan> control. +(defcustom vc-ignore-dir-regexp Stefan> "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'" + "Regexp Stefan> matching directory names that are not under VC's Stefan> control. The default regexp prevents fruitless and Stefan> time-consuming attempts to determine the VC status in Stefan> directories in which filenames are -interpreted as Stefan> hostnames.") +interpreted as hostnames." + :type Stefan> 'regexp + :group 'vc) Stefan> Stefan> (defcustom vc-handled-backends '(RCS CVS SVN SCCS Stefan> Arch MCVS) ;; Arch and MCVS come last because they Stefan> are per-tree rather than per-dir. @@ -308,6 +310,9 Stefan> @@ "Find the root of a checked out project. The Stefan> function walks up the directory tree from FILE Stefan> looking for WITNESS. If WITNESS if not found, return Stefan> nil, otherwise return the root." + ;; Represent Stefan> /home/luser/foo as ~/foo so that we don't try to look Stefan> for + ;; witnesses in /home or in /. + (setq file Stefan> (abbreviate-file-name file)) (let ((root nil)) (while Stefan> (not (or root (equal file (setq file Stefan> (file-name-directory file))) Stefan> Stefan> Stefan> _______________________________________________ Stefan> Emacs-devel mailing list Emacs-devel@gnu.org Stefan> http://lists.gnu.org/mailman/listinfo/emacs-devel -- Best Regards, --raman Email: raman@users.sf.net WWW: http://emacspeak.sf.net/raman/ AIM: emacspeak GTalk: tv.raman.tv@gmail.com PGP: http://emacspeak.sf.net/raman/raman-almaden.asc Google: tv+raman IRC: irc://irc.freenode.net/#emacs