emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v
Date: Wed, 09 May 2007 17:09:10 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/05/09 17:09:09

Index: vc-hooks.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -b -r1.183 -r1.184
--- vc-hooks.el 29 Apr 2007 01:04:38 -0000      1.183
+++ vc-hooks.el 9 May 2007 17:09:08 -0000       1.184
@@ -315,10 +315,17 @@
   ;; 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))
+  (let ((root nil)
+        (user (nth 2 (file-attributes file))))
     (while (not (or root
                    (equal file (setq file (file-name-directory file)))
                    (null file)
+                   ;; As a heuristic, we stop looking up the hierarchy of
+                   ;; directories as soon as we find a directory belonging
+                   ;; to another user.  This should save us from looking in
+                   ;; things like /net and /afs.  This assumes that all the
+                   ;; files inside a project belong to the same user.
+                   (not (equal user (file-attributes file)))
                    (string-match vc-ignore-dir-regexp file)))
       (if (file-exists-p (expand-file-name witness file))
          (setq root file)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]