Mercurial > emacs
diff lisp/vc-hooks.el @ 73351:29547db9ad61
(vc-ignore-dir-regexp): Make it into a defcustom.
(vc-find-root): Don't walk higher up than ~.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 13 Oct 2006 05:22:33 +0000 |
parents | 3bd95f4f2941 |
children | b2e5081b9320 2d56e13fd23d 8dd8c8286063 |
line wrap: on
line diff
--- a/lisp/vc-hooks.el Fri Oct 13 01:45:37 2006 +0000 +++ b/lisp/vc-hooks.el Fri Oct 13 05:22:33 2006 +0000 @@ -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)))