/[meta-cvs]/meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C
ViewVC logotype

Contents of /meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.20 - (show annotations)
Wed Mar 13 18:43:39 2002 UTC (12 years, 1 month ago) by kaz
Branch: MAIN
Changes since 1.19: +6 -3 lines
* generic.lisp (mcvs-generic): Add .cvsignore to the list of
metafiles.
1 ;;; This source file is part of the Meta-CVS program,
2 ;;; which is distributed under the GNU license.
3 ;;; Copyright 2002 Kaz Kylheku
4
5 (require "system")
6 (require "mapping")
7 (require "types")
8 (require "chatter")
9 (require "options")
10 (provide "generic")
11
12 (defun mcvs-generic (cvs-command cvs-options command-options command-args files)
13 (in-sandbox-root-dir
14 (let (files-to-process
15 (filemap (mapping-read *mcvs-map-local*)))
16
17 (chatter-debug "Preparing file list.~%")
18 (when (null files)
19 (setf files '(".")))
20 (dolist (file files)
21 (can-restart-here ("Continue preparing file list.")
22 (let* ((full-name (sandbox-translate-path file))
23 (entries (mapping-prefix-matches filemap full-name)))
24 (if (not entries)
25 (error "mcvs: ~a is not known to Meta-CVS." full-name)
26 (setf files-to-process (nconc files-to-process entries))))))
27
28 (when files-to-process
29 (chatter-debug "Synchronizing.~%")
30 (mapping-synchronize)
31
32 (current-dir-restore
33 (chdir *mcvs-dir*)
34 (chatter-debug "Invoking CVS.~%")
35 (execute-program-xargs `("cvs" ,@(format-opt cvs-options)
36 ,cvs-command ,@(format-opt command-options)
37 ,@command-args)
38 `(,@(unless *nometa-option*
39 (let (metas)
40 (when (exists ".cvsignore")
41 (push ".cvsignore" metas))
42 (when (exists *mcvs-types-name*)
43 (push *mcvs-types-name* metas))
44 (cons *mcvs-map-name* metas)))
45 ,@(mapcar #'(lambda (x)
46 (basename (first x)))
47 files-to-process))))))
48 (values)))
49
50 (defun mcvs-commit-wrapper (cvs-options cvs-command-options mcvs-args)
51 (mcvs-generic "commit" cvs-options cvs-command-options nil mcvs-args))
52
53 (defun mcvs-diff-wrapper (cvs-options cvs-command-options mcvs-args)
54 (mcvs-generic "diff" cvs-options cvs-command-options nil mcvs-args))
55
56 (defun mcvs-tag-wrapper (cvs-options cvs-command-options mcvs-args)
57 (if (null mcvs-args)
58 (error "mcvs-tag: specify tag optionally followed by files."))
59 (mcvs-generic "tag" cvs-options
60 cvs-command-options (list (first mcvs-args)) (rest mcvs-args)))
61
62 (defun mcvs-log-wrapper (cvs-options cvs-command-options mcvs-args)
63 (mcvs-generic "log" cvs-options cvs-command-options nil mcvs-args))
64
65 (defun mcvs-status-wrapper (cvs-options cvs-command-options mcvs-args)
66 (mcvs-generic "status" cvs-options cvs-command-options nil mcvs-args))
67
68 (defun mcvs-annotate-wrapper (cvs-options cvs-command-options mcvs-args)
69 (mcvs-generic "annotate" cvs-options cvs-command-options nil mcvs-args))

  ViewVC Help
Powered by ViewVC 1.1.5