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

Contents of /meta-cvs/F-C232DEE072E25B4F4683B91342CEC065

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.5