File: watch.lisp

package info (click to toggle)
mcvs 1.0.13-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 668 kB
  • ctags: 648
  • sloc: lisp: 5,091; ansic: 223; sh: 190; makefile: 58
file content (24 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;;; This source file is part of the Meta-CVS program, 
;;; which is distributed under the GNU license.
;;; Copyright 2002 Kaz Kylheku

(require "generic")
(provide "watch")

(defun mcvs-watch (mcvs-opts watch-opts files)
  (when (> (length watch-opts) 1)
    (error "only one option can be specified"))
  (find-bind (:test #'string= :key #'first)
	     ((on "on") (off "off")
	      (add "add") (remove "remove"))
	     watch-opts
    (let ((watch-args (cond
			(on '("on"))
			(off '("off"))
			(add `("add" "-a" ,(second add)))
			(remove `("remove" "-a" ,(second remove)))
			(t (error "no watch option specified")))))
      (mcvs-generic "watch" mcvs-opts nil watch-args files))))

(defun mcvs-watch-wrapper (mcvs-opts command-opts command-args)
  (mcvs-watch mcvs-opts command-opts command-args))