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: Fri, 20 Jul 2007 03:48:30 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/07/20 03:48:29

Index: vc-hooks.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -b -r1.193 -r1.194
--- vc-hooks.el 20 Jul 2007 01:22:18 -0000      1.193
+++ vc-hooks.el 20 Jul 2007 03:48:27 -0000      1.194
@@ -317,13 +317,12 @@
 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 /.
-  (while (not (file-exists-p file))
+  (while (not (file-directory-p file))
     (setq file (file-name-directory (directory-file-name file))))
   (setq file (abbreviate-file-name file))
   (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
@@ -334,7 +333,9 @@
                    (string-match vc-ignore-dir-regexp file)))
       (if (file-exists-p (expand-file-name witness file))
          (setq root file)
-       (setq file (directory-file-name file))))
+        (if (equal file
+                   (setq file (file-name-directory (directory-file-name 
file))))
+            (setq file nil))))
     root))
 
 ;; Access functions to file properties




reply via email to

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