comparison lisp/vc-arch.el @ 99784:248f432fca05

(vc-arch-program): Rename from vc-arch-command, for consistency with other backends. Make it a defcustom. (vc-arch-command, vc-arch-trim-revlib): Adapt for above change.
author Glenn Morris <rgm@gnu.org>
date Sat, 22 Nov 2008 03:30:22 +0000
parents 58d0fa1979cb
children 5a223111838e
comparison
equal deleted inserted replaced
99783:ebd796cf6d88 99784:248f432fca05
62 62
63 ;;; 63 ;;;
64 ;;; Customization options 64 ;;; Customization options
65 ;;; 65 ;;;
66 66
67 (defvar vc-arch-command 67 (define-obsolete-variable-alias 'vc-arch-command 'vc-arch-program "23.1")
68
69 (defcustom vc-arch-program
68 (let ((candidates '("tla" "baz"))) 70 (let ((candidates '("tla" "baz")))
69 (while (and candidates (not (executable-find (car candidates)))) 71 (while (and candidates (not (executable-find (car candidates))))
70 (setq candidates (cdr candidates))) 72 (setq candidates (cdr candidates)))
71 (or (car candidates) "tla"))) 73 (or (car candidates) "tla"))
74 "Name of the Arch executable."
75 :type 'string
76 :group 'vc)
72 77
73 ;; Clear up the cache to force vc-call to check again and discover 78 ;; Clear up the cache to force vc-call to check again and discover
74 ;; new functions when we reload this file. 79 ;; new functions when we reload this file.
75 (put 'Arch 'vc-functions nil) 80 (put 'Arch 'vc-functions nil)
76 81
461 466
462 (defalias 'vc-arch-responsible-p 'vc-arch-root) 467 (defalias 'vc-arch-responsible-p 'vc-arch-root)
463 468
464 (defun vc-arch-command (buffer okstatus file &rest flags) 469 (defun vc-arch-command (buffer okstatus file &rest flags)
465 "A wrapper around `vc-do-command' for use in vc-arch.el." 470 "A wrapper around `vc-do-command' for use in vc-arch.el."
466 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-arch-command file flags)) 471 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-arch-program file flags))
467 472
468 (defun vc-arch-init-revision () nil) 473 (defun vc-arch-init-revision () nil)
469 474
470 ;;; Completion of versions and revisions. 475 ;;; Completion of versions and revisions.
471 476
559 564
560 (defun vc-arch-trim-revlib () 565 (defun vc-arch-trim-revlib ()
561 "Delete half of the revisions in the revision library." 566 "Delete half of the revisions in the revision library."
562 (interactive) 567 (interactive)
563 (let ((rl-dir (with-output-to-string 568 (let ((rl-dir (with-output-to-string
564 (call-process vc-arch-command nil standard-output nil 569 (call-process vc-arch-program nil standard-output nil
565 "my-revision-library")))) 570 "my-revision-library"))))
566 (while (string-match "\\(.*\\)\n" rl-dir) 571 (while (string-match "\\(.*\\)\n" rl-dir)
567 (let ((dir (match-string 1 rl-dir))) 572 (let ((dir (match-string 1 rl-dir)))
568 (setq rl-dir 573 (setq rl-dir
569 (if (and (file-directory-p dir) (file-writable-p dir)) 574 (if (and (file-directory-p dir) (file-writable-p dir))
599 (define-key map [add-tagline] 604 (define-key map [add-tagline]
600 '(menu-item "Add tagline" vc-arch-add-tagline)) 605 '(menu-item "Add tagline" vc-arch-add-tagline))
601 map)) 606 map))
602 607
603 (defun vc-arch-extra-menu () vc-arch-extra-menu-map) 608 (defun vc-arch-extra-menu () vc-arch-extra-menu-map)
604 609
605 610
606 ;;; Less obvious implementations. 611 ;;; Less obvious implementations.
607 612
608 (defun vc-arch-find-revision (file rev buffer) 613 (defun vc-arch-find-revision (file rev buffer)
609 (let ((out (make-temp-file "vc-out"))) 614 (let ((out (make-temp-file "vc-out")))