comparison lisp/vc-svn.el @ 99782:6be2d2932794

Remove leading `*' from defcustom doc-strings. (vc-svn-program): Move defcustom to start. (vc-svn-create-repo, vc-svn-modify-change-comment): Use vc-svn-program rather than hard-coded "svn".
author Glenn Morris <rgm@gnu.org>
date Sat, 22 Nov 2008 03:27:18 +0000
parents 847ff1d1650c
children 18d556e2b8e1
comparison
equal deleted inserted replaced
99781:4f6e2e2864be 99782:6be2d2932794
33 33
34 ;;; 34 ;;;
35 ;;; Customization options 35 ;;; Customization options
36 ;;; 36 ;;;
37 37
38 ;; FIXME there is also svnadmin.
39 (defcustom vc-svn-program "svn"
40 "Name of the SVN executable."
41 :type 'string
42 :group 'vc)
43
38 (defcustom vc-svn-global-switches nil 44 (defcustom vc-svn-global-switches nil
39 "*Global switches to pass to any SVN command." 45 "Global switches to pass to any SVN command."
40 :type '(choice (const :tag "None" nil) 46 :type '(choice (const :tag "None" nil)
41 (string :tag "Argument String") 47 (string :tag "Argument String")
42 (repeat :tag "Argument List" 48 (repeat :tag "Argument List"
43 :value ("") 49 :value ("")
44 string)) 50 string))
45 :version "22.1" 51 :version "22.1"
46 :group 'vc) 52 :group 'vc)
47 53
48 (defcustom vc-svn-register-switches nil 54 (defcustom vc-svn-register-switches nil
49 "*Extra switches for registering a file into SVN. 55 "Extra switches for registering a file into SVN.
50 A string or list of strings passed to the checkin program by 56 A string or list of strings passed to the checkin program by
51 \\[vc-register]." 57 \\[vc-register]."
52 :type '(choice (const :tag "None" nil) 58 :type '(choice (const :tag "None" nil)
53 (string :tag "Argument String") 59 (string :tag "Argument String")
54 (repeat :tag "Argument List" 60 (repeat :tag "Argument List"
70 string)) 76 string))
71 :version "22.1" 77 :version "22.1"
72 :group 'vc) 78 :group 'vc)
73 79
74 (defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$")) 80 (defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$"))
75 "*Header keywords to be inserted by `vc-insert-headers'." 81 "Header keywords to be inserted by `vc-insert-headers'."
76 :version "22.1" 82 :version "22.1"
77 :type '(repeat string) 83 :type '(repeat string)
78 :group 'vc) 84 :group 'vc)
79 85
80 ;; We want to autoload it for use by the autoloaded version of 86 ;; We want to autoload it for use by the autoloaded version of
243 ;;; 249 ;;;
244 250
245 (defun vc-svn-create-repo () 251 (defun vc-svn-create-repo ()
246 "Create a new SVN repository." 252 "Create a new SVN repository."
247 (vc-do-command "*vc*" 0 "svnadmin" '("create" "SVN")) 253 (vc-do-command "*vc*" 0 "svnadmin" '("create" "SVN"))
248 (vc-do-command "*vc*" 0 "svn" '(".") 254 (vc-do-command "*vc*" 0 vc-svn-program '(".")
249 "checkout" (concat "file://" default-directory "SVN"))) 255 "checkout" (concat "file://" default-directory "SVN")))
250 256
251 (defun vc-svn-register (files &optional rev comment) 257 (defun vc-svn-register (files &optional rev comment)
252 "Register FILES into the SVN version-control system. 258 "Register FILES into the SVN version-control system.
253 The COMMENT argument is ignored This does an add but not a commit. 259 The COMMENT argument is ignored This does an add but not a commit.
406 uses locally for temp files must also be writeable by you on that host. 412 uses locally for temp files must also be writeable by you on that host.
407 This is only supported if the repository access method is either file:// 413 This is only supported if the repository access method is either file://
408 or svn+ssh://." 414 or svn+ssh://."
409 (let (tempfile host remotefile directory fileurl-p) 415 (let (tempfile host remotefile directory fileurl-p)
410 (with-temp-buffer 416 (with-temp-buffer
411 (vc-do-command (current-buffer) 0 "svn" nil "info") 417 (vc-do-command (current-buffer) 0 vc-svn-program nil "info")
412 (goto-char (point-min)) 418 (goto-char (point-min))
413 (unless (re-search-forward "Repository Root: \\(file://\\(/.*\\)\\)\\|\\(svn\\+ssh://\\([^/]+\\)\\(/.*\\)\\)" nil t) 419 (unless (re-search-forward "Repository Root: \\(file://\\(/.*\\)\\)\\|\\(svn\\+ssh://\\([^/]+\\)\\(/.*\\)\\)" nil t)
414 (error "Repository information is unavailable")) 420 (error "Repository information is unavailable"))
415 (if (match-string 1) 421 (if (match-string 1)
416 (progn 422 (progn
545 551
546 552
547 ;;; 553 ;;;
548 ;;; Internal functions 554 ;;; Internal functions
549 ;;; 555 ;;;
550
551 (defcustom vc-svn-program "svn"
552 "Name of the SVN executable."
553 :type 'string
554 :group 'vc)
555 556
556 (defun vc-svn-command (buffer okstatus file-or-list &rest flags) 557 (defun vc-svn-command (buffer okstatus file-or-list &rest flags)
557 "A wrapper around `vc-do-command' for use in vc-svn.el. 558 "A wrapper around `vc-do-command' for use in vc-svn.el.
558 The difference to vc-do-command is that this function always invokes `svn', 559 The difference to vc-do-command is that this function always invokes `svn',
559 and that it passes `vc-svn-global-switches' to it before FLAGS." 560 and that it passes `vc-svn-global-switches' to it before FLAGS."