From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Suggestion: vc-hooks.el: Make vc-handled-backends more conservative?
Date: Wed, 11 Oct 2006 14:28:03 -0400 [thread overview]
Message-ID: <jwvd58yzp8c.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <17708.61845.863249.25290@gargle.gargle.HOWL> (T. V. Raman's message of "Wed\, 11 Oct 2006 06\:28\:53 -0700")
> 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)))
next prev parent reply other threads:[~2006-10-11 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 1:44 Suggestion: vc-hooks.el: Make vc-handled-backends more conservative? T. V. Raman
2006-10-10 3:23 ` Stefan Monnier
2006-10-11 13:28 ` T. V. Raman
2006-10-11 18:28 ` Stefan Monnier [this message]
2006-10-13 1:31 ` T. V. Raman
2006-10-13 5:23 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvd58yzp8c.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).