mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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.
This commit is contained in:
parent
3e08f784d1
commit
83114ccf77
1 changed files with 6 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ switches."
|
|||
"Check if FILE is SVN registered."
|
||||
(setq file (expand-file-name file))
|
||||
(when (and (vc-svn-root file)
|
||||
(file-directory-p (file-name-directory file)))
|
||||
(file-accessible-directory-p (file-name-directory file)))
|
||||
(with-temp-buffer
|
||||
(cd (file-name-directory file))
|
||||
(let* (process-file-side-effects
|
||||
|
|
@ -310,11 +310,13 @@ to the SVN command."
|
|||
|
||||
(defalias 'vc-svn-responsible-p 'vc-svn-root)
|
||||
|
||||
(declare-function log-edit-extract-headers "log-edit" (headers string))
|
||||
|
||||
(defun vc-svn-checkin (files comment &optional _extra-args-ignored)
|
||||
"SVN-specific version of `vc-backend-checkin'."
|
||||
(let ((status (apply
|
||||
'vc-svn-command nil 1 files "ci"
|
||||
(nconc (cons "-m" (log-edit-extract-headers comment))
|
||||
(nconc (cons "-m" (log-edit-extract-headers nil comment))
|
||||
(vc-switches 'SVN 'checkin)))))
|
||||
(set-buffer "*vc*")
|
||||
(goto-char (point-min))
|
||||
|
|
@ -402,6 +404,8 @@ FILE is a file wildcard, relative to the root directory of DIRECTORY."
|
|||
(unless contents-done
|
||||
(vc-svn-command nil 0 file "revert")))
|
||||
|
||||
(autoload 'vc-read-revision "vc")
|
||||
|
||||
(defun vc-svn-merge-file (file)
|
||||
"Accept a file merge request, prompting for revisions."
|
||||
(let* ((first-revision
|
||||
|
|
|
|||
Loading…
Reference in a new issue