[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 [EMACS_22_BASE]
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v [EMACS_22_BASE] |
Date: |
Mon, 23 Jul 2007 05:38:45 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Stefan Monnier <monnier> 07/07/23 05:38:44
Index: vc-hooks.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.182.2.3
retrieving revision 1.182.2.4
diff -u -b -r1.182.2.3 -r1.182.2.4
--- vc-hooks.el 25 May 2007 04:41:42 -0000 1.182.2.3
+++ vc-hooks.el 23 Jul 2007 05:38:44 -0000 1.182.2.4
@@ -314,11 +314,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-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
@@ -329,7 +330,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
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v [EMACS_22_BASE],
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v [EMACS_22_BASE], Glenn Morris, 2007/07/25
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v [EMACS_22_BASE], Dan Nicolaescu, 2007/07/29
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v [EMACS_22_BASE], Stefan Monnier, 2007/07/31
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v [EMACS_22_BASE], Stefan Monnier, 2007/07/31