diff options
| author | Stefan Monnier | 2007-07-19 18:49:59 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-19 18:49:59 +0000 |
| commit | 66752bb47da390885d7ed199c78786985abf8a10 (patch) | |
| tree | 374d8664328c6a3bcec3baa7f01d9b47739d3178 | |
| parent | c1fec027ce02842c8710ec5a9fdd165c6ef37709 (diff) | |
| download | emacs-66752bb47da390885d7ed199c78786985abf8a10.tar.gz emacs-66752bb47da390885d7ed199c78786985abf8a10.zip | |
(vc-find-root): Walk up the tree to find an existing
`file' from which to start the search.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/vc-hooks.el | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 437b39a60aa..779c2093846 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,10 +1,14 @@ | |||
| 1 | 2007-07-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc-hooks.el (vc-find-root): Walk up the tree to find an existing | ||
| 4 | `file' from which to start the search. | ||
| 5 | |||
| 1 | 2007-07-19 Eric S. Raymond <esr@snark.thyrsus.com> | 6 | 2007-07-19 Eric S. Raymond <esr@snark.thyrsus.com> |
| 2 | 7 | ||
| 3 | * vc-cvs.el: vc-cvs-checkin had some reference problems, now | 8 | * vc-cvs.el: vc-cvs-checkin had some reference problems, now fixed. |
| 4 | fixed. | ||
| 5 | |||
| 6 | 9 | ||
| 7 | 2007-07-19 Stefan Monnier <monnier@iro.umontreal.ca> | 10 | 2007-07-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 11 | |||
| 8 | * files.el (locate-dominating-file): New function. | 12 | * files.el (locate-dominating-file): New function. |
| 9 | 13 | ||
| 10 | 2007-07-18 Michael Albinus <michael.albinus@gmx.de> | 14 | 2007-07-18 Michael Albinus <michael.albinus@gmx.de> |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 809b49a4d0e..19b309ee203 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -317,6 +317,8 @@ The function walks up the directory tree from FILE looking for WITNESS. | |||
| 317 | If WITNESS if not found, return nil, otherwise return the root." | 317 | If WITNESS if not found, return nil, otherwise return the root." |
| 318 | ;; Represent /home/luser/foo as ~/foo so that we don't try to look for | 318 | ;; Represent /home/luser/foo as ~/foo so that we don't try to look for |
| 319 | ;; witnesses in /home or in /. | 319 | ;; witnesses in /home or in /. |
| 320 | (while (not (file-exists-p file)) | ||
| 321 | (setq file (file-name-directory (directory-file-name file)))) | ||
| 320 | (setq file (abbreviate-file-name file)) | 322 | (setq file (abbreviate-file-name file)) |
| 321 | (let ((root nil) | 323 | (let ((root nil) |
| 322 | (user (nth 2 (file-attributes file)))) | 324 | (user (nth 2 (file-attributes file)))) |