changeset 81979:733a82d712c8

(vc-find-root): Walk up the tree to find an existing `file' from which to start the search.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 19 Jul 2007 18:49:59 +0000
parents ac7b97499a4b
children e320f477727a
files lisp/ChangeLog lisp/vc-hooks.el
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jul 19 14:27:06 2007 +0000
+++ b/lisp/ChangeLog	Thu Jul 19 18:49:59 2007 +0000
@@ -1,10 +1,14 @@
+2007-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc-hooks.el (vc-find-root): Walk up the tree to find an existing
+	`file' from which to start the search.
+
 2007-07-19  Eric S. Raymond  <esr@snark.thyrsus.com>
 
-	* vc-cvs.el: vc-cvs-checkin had some reference problems, now
-	fixed.
-	
+	* vc-cvs.el: vc-cvs-checkin had some reference problems, now fixed.
 
 2007-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
 	* files.el (locate-dominating-file): New function.
 
 2007-07-18  Michael Albinus  <michael.albinus@gmx.de>
--- a/lisp/vc-hooks.el	Thu Jul 19 14:27:06 2007 +0000
+++ b/lisp/vc-hooks.el	Thu Jul 19 18:49:59 2007 +0000
@@ -317,6 +317,8 @@
 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))
+    (setq file (file-name-directory (directory-file-name file))))
   (setq file (abbreviate-file-name file))
   (let ((root nil)
         (user (nth 2 (file-attributes file))))