Fix minor bugs in vc.

* vc/vc-mtn.el (vc-mtn-root):
* vc/vc-svn.el (vc-svn-registered): Make FILE absolute.
This commit is contained in:
Michael Albinus 2014-12-05 21:36:47 +01:00
parent 4fda400e58
commit 7d043d590d
3 changed files with 8 additions and 2 deletions

View file

@ -79,7 +79,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(defun vc-mtn-checkout-model (_files) 'implicit)
(defun vc-mtn-root (file)
(setq file (if (file-directory-p file)
(setq file (expand-file-name file)
file (if (file-directory-p file)
(file-name-as-directory file)
(file-name-directory file)))
(or (vc-file-getprop file 'vc-mtn-root)

View file

@ -135,6 +135,7 @@ If you want to force an empty list of arguments, use t."
(defun vc-svn-registered (file)
"Check if FILE is SVN registered."
(setq file (expand-file-name file))
(when (vc-svn-root file)
(with-temp-buffer
(cd (file-name-directory file))