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

Contents of /meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.24.2.1 - (show annotations)
Sat Jul 6 15:49:12 2002 UTC (11 years, 9 months ago) by kaz
Branch: partial-sandbox-branch
CVS Tags: partial-sandbox-branch~merged-to-HEAD-0
Changes since 1.24: +2 -1 lines
* generic.lisp (mcvs-generic): Added path conversions to support
partial sandboxes.
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
13 files &key need-sync-after default-include-meta-files
14 need-update-after)
15 (in-sandbox-root-dir
16 (let (files-to-process
17 (filemap (mapping-read *mcvs-map-local*))
18 (do-meta-files (and (or *metaonly-option* *meta-option*
19 default-include-meta-files)
20 (not *nometa-option*))))
21
22 (unless *metaonly-option*
23 (chatter-debug "Preparing file list.~%")
24
25 (if (null files)
26 (setf files-to-process
27 (mapping-prefix-matches filemap
28 (sandbox-translate-path ".")))
29 (dolist (file files)
30 (can-restart-here ("Continue preparing file list.")
31 (let* ((full-name (sandbox-translate-path file))
32 (abs-name (real-to-abstract-path full-name))
33 (entries (mapping-prefix-matches filemap abs-name)))
34 (if (not entries)
35 (error "mcvs: ~a is not known to Meta-CVS." full-name)
36 (setf files-to-process (nconc files-to-process entries))))))))
37
38 (unless (and (not files-to-process)
39 (not do-meta-files))
40 (chatter-debug "Synchronizing.~%")
41 (mapping-synchronize)
42
43 (current-dir-restore
44 (chdir *mcvs-dir*)
45 (chatter-debug "Invoking CVS.~%")
46 (execute-program-xargs `("cvs" ,@(format-opt cvs-options)
47 ,cvs-command ,@(format-opt command-options)
48 ,@command-args)
49 `(,@(when do-meta-files
50 (let (metas)
51 (when (exists ".cvsignore")
52 (push ".cvsignore" metas))
53 (when (exists *mcvs-types-name*)
54 (push *mcvs-types-name* metas))
55 (cons *mcvs-map-name* metas)))
56 ,@(mapcar #'(lambda (x)
57 (basename (first x)))
58 files-to-process))))
59 (when (and do-meta-files need-update-after)
60 (chatter-debug "Updating file structure.~%")
61 (mapping-update))
62 (when need-sync-after
63 (chatter-debug "Synchronizing again.~%")
64 (mapping-synchronize))))
65 (values)))
66
67 (defun mcvs-commit-wrapper (cvs-options cvs-command-options mcvs-args)
68 (mcvs-generic "commit" cvs-options cvs-command-options nil mcvs-args
69 :default-include-meta-files t))
70
71 (defun mcvs-diff-wrapper (cvs-options cvs-command-options mcvs-args)
72 (mcvs-generic "diff" cvs-options cvs-command-options nil mcvs-args))
73
74 (defun mcvs-tag-wrapper (cvs-options cvs-command-options mcvs-args)
75 (if (null mcvs-args)
76 (error "mcvs-tag: specify tag optionally followed by files."))
77 (mcvs-generic "tag" cvs-options
78 cvs-command-options (list (first mcvs-args)) (rest mcvs-args)
79 :default-include-meta-files t))
80
81 (defun mcvs-log-wrapper (cvs-options cvs-command-options mcvs-args)
82 (mcvs-generic "log" cvs-options cvs-command-options nil mcvs-args))
83
84 (defun mcvs-status-wrapper (cvs-options cvs-command-options mcvs-args)
85 (mcvs-generic "status" cvs-options cvs-command-options nil mcvs-args))
86
87 (defun mcvs-annotate-wrapper (cvs-options cvs-command-options mcvs-args)
88 (mcvs-generic "annotate" cvs-options cvs-command-options nil mcvs-args))

  ViewVC Help
Powered by ViewVC 1.1.5