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

Contents of /meta-cvs/F-C232DEE072E25B4F4683B91342CEC065

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations)
Fri Feb 1 02:23:46 2002 UTC (12 years, 2 months ago) by kaz
Branch: MAIN
CVS Tags: mcvs-0-3, mcvs-0-6, mcvs-0-5, mcvs-0-4, latest-patch
Changes since 1.8: +1 -1 lines
Renamed all ``filemap-'' functions to ``mapping-'' prefix.

* mapping.lisp (filemap-generate-name, filemap-sort,
filemap-extract-paths, filemap-lookup, filemap-prefix-lookup,
filemap-prefix-matches, filemap-object-lookup,
filemap-same-object-p, filemap-same-path-p, filemap-moved-p,
filemap-rename-files, filemap-sane-p): Old names removed.
(mapping-generate-name, mapping-sort,
mapping-extract-paths, mapping-lookup, mapping-prefix-lookup,
mapping-prefix-matches, mapping-object-lookup,
mapping-same-object-p, mapping-same-path-p, mapping-moved-p,
mapping-rename-files, mapping-sane-p): New names created.
(mapping-read, mapping-write, mapping-synchronize,
mapping-update): Edit calls to renamed functions.
* add.lisp (mcvs-add): Likewise.
* diff.lisp (mcvs-diff): Likewise.
* filt.lisp (mcvs-filt): Likewise.
* import.lisp (mcvs-import): Likewise.
* move.lisp (simple-rename, simple-move-to-dir, move-guts): Likewise.
* remove.lisp (mcvs-remove): Likewise.
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 "dirwalk")
6 (require "mapping")
7 (require "chatter")
8 (require "options")
9 (provide "import")
10
11 (defun mcvs-import (module vendor release
12 &optional cvs-options import-options)
13 (multiple-value-bind (path created) (ensure-directories-exist *mcvs-map*)
14 (declare (ignore path))
15 (if (not created)
16 (error "mcvs-import: A ~a directory already exists here." *mcvs-dir*)))
17
18 (unwind-protect
19 (progn
20 (let (filemap)
21 (chatter-info "Mapping.~%")
22 (for-each-file-info (fi ".")
23 (when (regular-p fi)
24 (let ((path (canonicalize-path (file-name fi)))
25 (file (mapping-generate-name)))
26 (chatter-info "~a <- ~a~%" file path)
27 (push (list file path) filemap))))
28 (dolist (item filemap)
29 (link (second item) (first item)))
30 (mapping-write filemap *mcvs-map* :sort-map t))
31
32 (current-dir-restore
33 (chdir *mcvs-dir*)
34 (chatter-info "Invoking CVS.~%")
35 (execute-program `("cvs" ,@(format-opt cvs-options)
36 "import" ,@(format-opt import-options)
37 ,module ,vendor ,release))))
38
39 (chatter-info "removing ~a directory~%" *mcvs-dir*)
40 (delete-recursive *mcvs-dir*))
41 (values))
42
43 (defun mcvs-import-wrapper (cvs-options cvs-command-options mcvs-args)
44 (if (< (length mcvs-args) 3)
45 (error "mcvs-import: specify module, vendor tag and release tag."))
46 (destructuring-bind (module vendor release &rest superfluous) mcvs-args
47 (when superfluous
48 (error "mcvs-import: specify only module, vendor tag and release tag."))
49 (mcvs-import module vendor release cvs-options cvs-command-options)))

  ViewVC Help
Powered by ViewVC 1.1.5