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

Contents of /meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.25 - (hide annotations)
Sat Jul 6 17:15:02 2002 UTC (11 years, 9 months ago) by kaz
Branch: MAIN
CVS Tags: mcvs-0-19, mcvs-0-18
Changes since 1.24: +2 -1 lines
Merging from partial-sandbox-branch.
1 kaz 1.9 ;;; This source file is part of the Meta-CVS program,
2 kaz 1.6 ;;; which is distributed under the GNU license.
3     ;;; Copyright 2002 Kaz Kylheku
4    
5 kaz 1.1 (require "system")
6     (require "mapping")
7 kaz 1.17 (require "types")
8 kaz 1.1 (require "chatter")
9 kaz 1.7 (require "options")
10 kaz 1.13 (provide "generic")
11 kaz 1.1
12 kaz 1.21 (defun mcvs-generic (cvs-command cvs-options command-options command-args
13 kaz 1.23 files &key need-sync-after default-include-meta-files
14     need-update-after)
15 kaz 1.3 (in-sandbox-root-dir
16 kaz 1.13 (let (files-to-process
17 kaz 1.23 (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 kaz 1.1
22 kaz 1.23 (unless *metaonly-option*
23     (chatter-debug "Preparing file list.~%")
24 kaz 1.1
25 kaz 1.23 (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 kaz 1.25 (abs-name (real-to-abstract-path full-name))
33     (entries (mapping-prefix-matches filemap abs-name)))
34 kaz 1.23 (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 kaz 1.22
38 kaz 1.23 (unless (and (not files-to-process)
39     (not do-meta-files))
40 kaz 1.19 (chatter-debug "Synchronizing.~%")
41 kaz 1.1 (mapping-synchronize)
42    
43     (current-dir-restore
44     (chdir *mcvs-dir*)
45 kaz 1.19 (chatter-debug "Invoking CVS.~%")
46 kaz 1.12 (execute-program-xargs `("cvs" ,@(format-opt cvs-options)
47 kaz 1.13 ,cvs-command ,@(format-opt command-options)
48     ,@command-args)
49 kaz 1.23 `(,@(when do-meta-files
50 kaz 1.20 (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 kaz 1.12 ,@(mapcar #'(lambda (x)
57     (basename (first x)))
58 kaz 1.21 files-to-process))))
59 kaz 1.23 (when (and do-meta-files need-update-after)
60     (chatter-debug "Updating file structure.~%")
61     (mapping-update))
62 kaz 1.21 (when need-sync-after
63     (chatter-debug "Synchronizing again.~%")
64     (mapping-synchronize))))
65 kaz 1.1 (values)))
66 kaz 1.18
67     (defun mcvs-commit-wrapper (cvs-options cvs-command-options mcvs-args)
68 kaz 1.23 (mcvs-generic "commit" cvs-options cvs-command-options nil mcvs-args
69     :default-include-meta-files t))
70 kaz 1.4
71 kaz 1.7 (defun mcvs-diff-wrapper (cvs-options cvs-command-options mcvs-args)
72 kaz 1.13 (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 kaz 1.24 cvs-command-options (list (first mcvs-args)) (rest mcvs-args)
79     :default-include-meta-files t))
80 kaz 1.14
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