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

Contents of /meta-cvs/F-C232DEE072E25B4F4683B91342CEC065

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Sat Jan 26 02:08:18 2002 UTC (12 years, 2 months ago) by kaz
Branch: MAIN
Changes since 1.2: +1 -0 lines
Fixing compiler errors.
1 kaz 1.1 (require "dirwalk")
2     (require "mapping")
3     (require "chatter")
4     (provide "import")
5    
6 kaz 1.2 (defun mcvs-import (module vendor release
7     &optional cvs-options import-options)
8 kaz 1.1 (multiple-value-bind (path created) (ensure-directories-exist *mcvs-map*)
9 kaz 1.3 (declare (ignore path))
10 kaz 1.1 (if (not created)
11     (error "mcvs-import: A ~ directory already exists here." *mcvs-dir*)))
12    
13     (unwind-protect
14     (progn
15     (let (filemap)
16     (chatter-info "Mapping.~%")
17     (for-each-file-info (fi ".")
18     (when (regular-p fi)
19     (let ((path (canonicalize-path (file-name fi)))
20     (file (filemap-generate-name)))
21     (chatter-info "~a <- ~a~%" file path)
22     (push (list file path) filemap))))
23     (dolist (item filemap)
24     (link (second item) (first item)))
25     (with-open-file (file *mcvs-map* :direction :output)
26     (let ((*print-right-margin* 1))
27     (prin1 (filemap-sort filemap) file)
28     (terpri file))))
29    
30     (current-dir-restore
31     (chdir *mcvs-dir*)
32     (chatter-info "Invoking CVS.~%")
33 kaz 1.2 (execute-program `("cvs" ,@cvs-options "import" ,@import-options
34     ,module ,vendor ,release))))
35 kaz 1.1
36     (chatter-info "removing ~a directory~%" *mcvs-dir*)
37     (delete-recursive *mcvs-dir*))
38     (values))
39 kaz 1.2
40     (defun mcvs-import-wrapper (cvs-options cvs-specific-options mcvs-args)
41     (destructuring-bind (module vendor release &rest superfluous) mcvs-args
42     (when superfluous
43     (error "mcvs-import: specify only module, vendor-tag and release-tag."))
44     (mcvs-import module vendor release cvs-options cvs-specific-options)))

  ViewVC Help
Powered by ViewVC 1.1.5