# HG changeset patch # User Stefan Monnier # Date 1184870999 0 # Node ID 733a82d712c86984c2062af37f0fd70b27ac8f68 # Parent ac7b97499a4b1f4f6ada297569bf934119e98edd (vc-find-root): Walk up the tree to find an existing `file' from which to start the search. diff -r ac7b97499a4b -r 733a82d712c8 lisp/ChangeLog --- 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 + + * 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 - * 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 + * files.el (locate-dominating-file): New function. 2007-07-18 Michael Albinus diff -r ac7b97499a4b -r 733a82d712c8 lisp/vc-hooks.el --- 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))))