[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v |
Date: |
Sun, 24 Feb 2008 10:09:13 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/02/24 10:09:07
Index: lisp/vc-hooks.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -b -r1.226 -r1.227
--- lisp/vc-hooks.el 19 Feb 2008 11:43:17 -0000 1.226
+++ lisp/vc-hooks.el 24 Feb 2008 10:08:53 -0000 1.227
@@ -333,12 +333,13 @@
the root is the last directory for which WITNESS *is* found."
;; Represent /home/luser/foo as ~/foo so that we don't try to look for
;; witnesses in /home or in /.
- (while (not (file-directory-p file))
- (setq file (file-name-directory (directory-file-name file))))
(setq file (abbreviate-file-name file))
(let ((root nil)
(prev-file file)
- (user (nth 2 (file-attributes file)))
+ ;; `user' is not initialized outside the loop because
+ ;; `file' may not exist, so we may have to walk up part of the
+ ;; hierarchy before we find the "initial UID".
+ (user nil)
try)
(while (not (or root
(null file)
@@ -347,7 +348,9 @@
;; 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 (nth 2 (file-attributes file))))
+ (let ((prev-user user))
+ (setq user (nth 2 (file-attributes file)))
+ (and prev-user (not (equal user prev-user))))
(string-match vc-ignore-dir-regexp file)))
(setq try (file-exists-p (expand-file-name witness file)))
(cond ((and invert (not try)) (setq root prev-file))
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Sam Steingold, 2008/02/06
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Sam Steingold, 2008/02/06
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Sam Steingold, 2008/02/10
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Dan Nicolaescu, 2008/02/15
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v,
Miles Bader <=
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Dan Nicolaescu, 2008/02/29