2011-11-10 Glenn Morris <rgm@gnu.org>
+ * vc/vc-svn.el (vc-svn-create-repo, vc-svn-modify-change-comment):
+ Call svn via vc-svn-command rather than vc-do-command.
+ (vc-svn-command): Add --non-interactive. (Bug#9993)
+ (vc-svn-update, vc-svn-merge-news): No need for --non-interactive.
+
* emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
Add toggle-read-only. (Bug#7292)
* files.el (toggle-read-only): Mention that it should only
(defun vc-svn-create-repo ()
"Create a new SVN repository."
(vc-do-command "*vc*" 0 "svnadmin" '("create" "SVN"))
- (vc-do-command "*vc*" 0 vc-svn-program '(".")
- "checkout" (concat "file://" default-directory "SVN")))
+ (vc-svn-command "*vc*" 0 "." "checkout"
+ (concat "file://" default-directory "SVN")))
(defun vc-svn-register (files &optional rev comment)
"Register FILES into the SVN version-control system.
;; Check out a particular version (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
(apply 'vc-svn-command nil 0 file
- "--non-interactive" ; bug#4280
"update"
(cond
((null rev) "-rBASE")
(message "Merging changes into %s..." file)
;; (vc-file-setprop file 'vc-working-revision nil)
(vc-file-setprop file 'vc-checkout-time 0)
- (vc-svn-command nil 0 file "--non-interactive" "update") ; see bug#7152
+ (vc-svn-command nil 0 file "update")
;; Analyze the merge result reported by SVN, and set
;; file properties accordingly.
(with-current-buffer (get-buffer "*vc*")
or svn+ssh://."
(let (tempfile host remotefile directory fileurl-p)
(with-temp-buffer
- (vc-do-command (current-buffer) 0 vc-svn-program nil "info")
+ (vc-svn-command (current-buffer) 0 nil "info")
(goto-char (point-min))
(unless (re-search-forward "Repository Root: \\(file://\\(/.*\\)\\)\\|\\(svn\\+ssh://\\([^/]+\\)\\(/.*\\)\\)" nil t)
(error "Repository information is unavailable"))
(defun vc-svn-command (buffer okstatus file-or-list &rest flags)
"A wrapper around `vc-do-command' for use in vc-svn.el.
The difference to vc-do-command is that this function always invokes `svn',
-and that it passes `vc-svn-global-switches' to it before FLAGS."
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list
- (if (stringp vc-svn-global-switches)
+and that it passes \"--non-interactive\" and `vc-svn-global-switches' to
+it before FLAGS."
+ ;; Might be nice if svn defaulted to non-interactive if stdin not tty.
+ ;; http://svn.haxx.se/dev/archive-2008-05/0762.shtml
+ ;; http://svn.haxx.se/dev/archive-2009-04/0094.shtml
+ ;; Maybe newer ones do?
+ (or (member "--non-interactive"
+ (setq flags (if (stringp vc-svn-global-switches)
(cons vc-svn-global-switches flags)
- (append vc-svn-global-switches
- flags))))
+ (append vc-svn-global-switches flags))))
+ (setq flags (cons "--non-interactive" flags)))
+ (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list
+ flags))
(defun vc-svn-repository-hostname (dirname)
(with-temp-buffer