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

Contents of /meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.29 - (hide annotations)
Mon Oct 7 02:44:30 2002 UTC (11 years, 6 months ago) by kaz
Branch: MAIN
CVS Tags: mcvs-1-0-branch~branch-point, mcvs-0-97
Branch point for: mcvs-1-0-branch
Changes since 1.28: +2 -1 lines
* code/prop.lisp (mcvs-prop): Result of real-to-abstract-path
must be canonicalized.

* code/remove.lisp (mcvs-remove): Likewise.

* code/generic.lisp (mcvs-generic): Likewise.
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 kaz 1.26 need-update-after no-fix-empty-file-list)
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 kaz 1.26 default-include-meta-files)
20     (not (and (null files)
21     no-fix-empty-file-list
22     (not *metaonly-option*)))
23 kaz 1.23 (not *nometa-option*))))
24 kaz 1.1
25 kaz 1.26 (unless (or *metaonly-option*)
26 kaz 1.23 (chatter-debug "Preparing file list.~%")
27 kaz 1.1
28 kaz 1.23 (if (null files)
29 kaz 1.26 (unless no-fix-empty-file-list
30     (setf files-to-process
31     (mapping-prefix-matches filemap
32     (sandbox-translate-path "."))))
33 kaz 1.23 (dolist (file files)
34     (can-restart-here ("Continue preparing file list.")
35     (let* ((full-name (sandbox-translate-path file))
36 kaz 1.29 (abs-name (canonicalize-path
37     (real-to-abstract-path full-name)))
38 kaz 1.25 (entries (mapping-prefix-matches filemap abs-name)))
39 kaz 1.23 (if (not entries)
40 kaz 1.28 (error "~a is not known to Meta-CVS." full-name)
41 kaz 1.23 (setf files-to-process (nconc files-to-process entries))))))))
42 kaz 1.22
43 kaz 1.27 (setf files-to-process (mapping-extract-kind files-to-process :file))
44    
45 kaz 1.26 (when (or files-to-process
46     do-meta-files
47     no-fix-empty-file-list)
48 kaz 1.19 (chatter-debug "Synchronizing.~%")
49 kaz 1.1 (mapping-synchronize)
50    
51     (current-dir-restore
52     (chdir *mcvs-dir*)
53 kaz 1.19 (chatter-debug "Invoking CVS.~%")
54 kaz 1.12 (execute-program-xargs `("cvs" ,@(format-opt cvs-options)
55 kaz 1.13 ,cvs-command ,@(format-opt command-options)
56     ,@command-args)
57 kaz 1.23 `(,@(when do-meta-files
58 kaz 1.20 (let (metas)
59     (when (exists ".cvsignore")
60     (push ".cvsignore" metas))
61     (when (exists *mcvs-types-name*)
62     (push *mcvs-types-name* metas))
63     (cons *mcvs-map-name* metas)))
64 kaz 1.12 ,@(mapcar #'(lambda (x)
65 kaz 1.27 (basename
66     (mapping-entry-id x)))
67 kaz 1.21 files-to-process))))
68 kaz 1.23 (when (and do-meta-files need-update-after)
69     (chatter-debug "Updating file structure.~%")
70     (mapping-update))
71 kaz 1.21 (when need-sync-after
72     (chatter-debug "Synchronizing again.~%")
73     (mapping-synchronize))))
74 kaz 1.1 (values)))
75 kaz 1.18
76     (defun mcvs-commit-wrapper (cvs-options cvs-command-options mcvs-args)
77 kaz 1.23 (mcvs-generic "commit" cvs-options cvs-command-options nil mcvs-args
78 kaz 1.26 :default-include-meta-files t
79     :no-fix-empty-file-list t))
80 kaz 1.4
81 kaz 1.7 (defun mcvs-diff-wrapper (cvs-options cvs-command-options mcvs-args)
82 kaz 1.13 (mcvs-generic "diff" cvs-options cvs-command-options nil mcvs-args))
83    
84     (defun mcvs-tag-wrapper (cvs-options cvs-command-options mcvs-args)
85     (if (null mcvs-args)
86 kaz 1.28 (error "specify tag optionally followed by files."))
87 kaz 1.13 (mcvs-generic "tag" cvs-options
88 kaz 1.24 cvs-command-options (list (first mcvs-args)) (rest mcvs-args)
89     :default-include-meta-files t))
90 kaz 1.14
91     (defun mcvs-log-wrapper (cvs-options cvs-command-options mcvs-args)
92     (mcvs-generic "log" cvs-options cvs-command-options nil mcvs-args))
93    
94     (defun mcvs-status-wrapper (cvs-options cvs-command-options mcvs-args)
95     (mcvs-generic "status" cvs-options cvs-command-options nil mcvs-args))
96    
97     (defun mcvs-annotate-wrapper (cvs-options cvs-command-options mcvs-args)
98     (mcvs-generic "annotate" cvs-options cvs-command-options nil mcvs-args))

  ViewVC Help
Powered by ViewVC 1.1.5