comparison lisp/pcvs.el @ 81647:ac3b08278482

(cvs-reread-cvsrc, cvs-header-msg, cvs-checkout) (cvs-mode-checkout, cvs-execute-single-file): Use new function names strings->string, string->strings.
author Nick Roberts <nickrob@snap.net.nz>
date Thu, 28 Jun 2007 01:37:40 +0000
parents e16960b7b99b
children 896bf6c07ad3 988f1edc9674
comparison
equal deleted inserted replaced
81646:2f3bcf8fe6fc 81647:ac3b08278482
180 "add" "commit" "remove" "update")) 180 "add" "commit" "remove" "update"))
181 (goto-char (point-min)) 181 (goto-char (point-min))
182 (when (re-search-forward 182 (when (re-search-forward
183 (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t) 183 (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t)
184 (let* ((sym (intern (concat "cvs-" cmd "-flags"))) 184 (let* ((sym (intern (concat "cvs-" cmd "-flags")))
185 (val (cvs-string->strings (or (match-string 2) "")))) 185 (val (string->strings (or (match-string 2) ""))))
186 (cvs-flags-set sym 0 val)))) 186 (cvs-flags-set sym 0 val))))
187 ;; ensure that cvs doesn't have -q or -Q 187 ;; ensure that cvs doesn't have -q or -Q
188 (cvs-flags-set 'cvs-cvs-flags 0 188 (cvs-flags-set 'cvs-cvs-flags 0
189 (cons "-f" 189 (cons "-f"
190 (cdr (cvs-partition 190 (cdr (cvs-partition
605 (concat (match-string 0 arg) "<log message>")) 605 (concat (match-string 0 arg) "<log message>"))
606 ;; Keep the rest as is. 606 ;; Keep the rest as is.
607 (t arg))) 607 (t arg)))
608 args))) 608 args)))
609 (concat cvs-program " " 609 (concat cvs-program " "
610 (cvs-strings->string 610 (strings->string
611 (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery) 611 (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery)
612 (if cvs-cvsroot (list "-d" cvs-cvsroot)) 612 (if cvs-cvsroot (list "-d" cvs-cvsroot))
613 args 613 args
614 (mapcar 'cvs-fileinfo->full-name fis)))))) 614 (mapcar 'cvs-fileinfo->full-name fis))))))
615 615
934 With a prefix argument, prompt for cvs FLAGS to use." 934 With a prefix argument, prompt for cvs FLAGS to use."
935 (interactive 935 (interactive
936 (let ((root (cvs-get-cvsroot))) 936 (let ((root (cvs-get-cvsroot)))
937 (if (or (null root) current-prefix-arg) 937 (if (or (null root) current-prefix-arg)
938 (setq root (read-string "CVS Root: "))) 938 (setq root (read-string "CVS Root: ")))
939 (list (cvs-string->strings (read-string "Module(s): " (cvs-get-module))) 939 (list (string->strings (read-string "Module(s): " (cvs-get-module)))
940 (read-directory-name "CVS Checkout Directory: " 940 (read-directory-name "CVS Checkout Directory: "
941 nil default-directory nil) 941 nil default-directory nil)
942 (cvs-add-branch-prefix 942 (cvs-add-branch-prefix
943 (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags")) 943 (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))
944 root))) 944 root)))
957 (prompt (format "CVS Checkout Directory for `%s%s': " 957 (prompt (format "CVS Checkout Directory for `%s%s': "
958 (cvs-get-module) 958 (cvs-get-module)
959 (if branch (format " (branch: %s)" branch) 959 (if branch (format " (branch: %s)" branch)
960 "")))) 960 ""))))
961 (list (read-directory-name prompt nil default-directory nil)))) 961 (list (read-directory-name prompt nil default-directory nil))))
962 (let ((modules (cvs-string->strings (cvs-get-module))) 962 (let ((modules (string->strings (cvs-get-module)))
963 (flags (cvs-add-branch-prefix 963 (flags (cvs-add-branch-prefix
964 (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))) 964 (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags")))
965 (cvs-cvsroot (cvs-get-cvsroot))) 965 (cvs-cvsroot (cvs-get-cvsroot)))
966 (cvs-checkout modules dir flags))) 966 (cvs-checkout modules dir flags)))
967 967
2242 ;; Execute the command unless extractor returned t. 2242 ;; Execute the command unless extractor returned t.
2243 (when (listp arg-list) 2243 (when (listp arg-list)
2244 (let* ((args (append constant-args arg-list))) 2244 (let* ((args (append constant-args arg-list)))
2245 2245
2246 (insert (format "=== %s %s\n\n" 2246 (insert (format "=== %s %s\n\n"
2247 program (cvs-strings->string args))) 2247 program (strings->string args)))
2248 2248
2249 ;; FIXME: return the exit status? 2249 ;; FIXME: return the exit status?
2250 (apply 'call-process program nil t t args) 2250 (apply 'call-process program nil t t args)
2251 (goto-char (point-max)))))) 2251 (goto-char (point-max))))))
2252 2252