aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-11 12:50:53 +0200
committerEli Zaretskii2015-12-11 12:50:53 +0200
commit83114ccf77d2a5d59fccbdbda6edefacce1b979e (patch)
tree0ceaff78be4069c76c287ac2c9fe31bcbfd08254
parent3e08f784d1cb8ebd0bd4ff53c1948a65c4924d52 (diff)
downloademacs-83114ccf77d2a5d59fccbdbda6edefacce1b979e.tar.gz
emacs-83114ccf77d2a5d59fccbdbda6edefacce1b979e.zip
Avoid errors when creating files under SVN in new directory
* lisp/vc/vc-svn.el (vc-svn-registered): Use file-accessible-directory-p, to avoid cd'ing to a non-existing directory, which signals an error on some systems. (Bug#21984) (vc-svn-checkin): Call log-edit-extract-headers with 2 arguments. Use declare-function to avoid byte-compiler warnings.
-rw-r--r--lisp/vc/vc-svn.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index a15f3413a8d..a50befa9e4c 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -148,7 +148,7 @@ switches."
148 "Check if FILE is SVN registered." 148 "Check if FILE is SVN registered."
149 (setq file (expand-file-name file)) 149 (setq file (expand-file-name file))
150 (when (and (vc-svn-root file) 150 (when (and (vc-svn-root file)
151 (file-directory-p (file-name-directory file))) 151 (file-accessible-directory-p (file-name-directory file)))
152 (with-temp-buffer 152 (with-temp-buffer
153 (cd (file-name-directory file)) 153 (cd (file-name-directory file))
154 (let* (process-file-side-effects 154 (let* (process-file-side-effects
@@ -310,11 +310,13 @@ to the SVN command."
310 310
311(defalias 'vc-svn-responsible-p 'vc-svn-root) 311(defalias 'vc-svn-responsible-p 'vc-svn-root)
312 312
313(declare-function log-edit-extract-headers "log-edit" (headers string))
314
313(defun vc-svn-checkin (files comment &optional _extra-args-ignored) 315(defun vc-svn-checkin (files comment &optional _extra-args-ignored)
314 "SVN-specific version of `vc-backend-checkin'." 316 "SVN-specific version of `vc-backend-checkin'."
315 (let ((status (apply 317 (let ((status (apply
316 'vc-svn-command nil 1 files "ci" 318 'vc-svn-command nil 1 files "ci"
317 (nconc (cons "-m" (log-edit-extract-headers comment)) 319 (nconc (cons "-m" (log-edit-extract-headers nil comment))
318 (vc-switches 'SVN 'checkin))))) 320 (vc-switches 'SVN 'checkin)))))
319 (set-buffer "*vc*") 321 (set-buffer "*vc*")
320 (goto-char (point-min)) 322 (goto-char (point-min))
@@ -402,6 +404,8 @@ FILE is a file wildcard, relative to the root directory of DIRECTORY."
402 (unless contents-done 404 (unless contents-done
403 (vc-svn-command nil 0 file "revert"))) 405 (vc-svn-command nil 0 file "revert")))
404 406
407(autoload 'vc-read-revision "vc")
408
405(defun vc-svn-merge-file (file) 409(defun vc-svn-merge-file (file)
406 "Accept a file merge request, prompting for revisions." 410 "Accept a file merge request, prompting for revisions."
407 (let* ((first-revision 411 (let* ((first-revision