[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative?
From: |
Stefan Monnier |
Subject: |
Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative? |
Date: |
Wed, 11 Oct 2006 14:28:03 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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)))