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

Diff of /meta-cvs/F-C232DEE072E25B4F4683B91342CEC065

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by kaz, Mon Feb 18 06:14:22 2002 UTC revision 1.13 by kaz, Sat Mar 9 21:44:28 2002 UTC
# Line 10  Line 10 
10  (require "options")  (require "options")
11  (provide "import")  (provide "import")
12    
 (defconstant *types-comments*  
 ";;; For each file suffix that appears in the imported files, you can specify  
 ;;; the CVS keyword expansion mode, or you can specify that the files having  
 ;;; that suffix should not be imported. This is done by editing the list below.  
 ;;; Here are the symbols you can specify next to each suffix.  
 ;;;  
 ;;;   :default    Expand keyword using default form. (CVS -kkv)  
 ;;;   :name-only  Expand only the keyword name on checkout. (CVS -kk)  
 ;;;   :keep-old   Do not expand keywords, and keep any CVS or RCS keywords  
 ;;;               that are already present in the files. (CVS -ko)  
 ;;;   :binary     Like :keep-old except that the file is treated as  
 ;;;               binary. Not only are keywords not expanded, but line ending  
 ;;;               conversions are not performed either. (CVS -kb)  
 ;;;   :value-only Expand only the keyword value, no dollar signs. (CVS -kv)  
 ;;;   :ignore     Do not import or add these files.  
 ")  
   
13  (defun mcvs-import (module vendor release  (defun mcvs-import (module vendor release
14                      &optional cvs-options import-options)                      &optional cvs-options import-options)
15    (multiple-value-bind (path created) (ensure-directories-exist *mcvs-map*)    (multiple-value-bind (path created) (ensure-directories-exist *mcvs-map*)
# Line 53  Line 36 
36                                       types :test #'equal))))))                                       types :test #'equal))))))
37    
38          ;; Write out types to file and allow user to edit.          ;; Write out types to file and allow user to edit.
39          (when types          (setf types (types-let-user-edit types *mcvs-types*))
           (types-write types *mcvs-types* :comments *types-comments*)  
           (loop  
             (restart-case  
               (progn  
                 (chatter-info "Editing types.~%")  
                 (edit-file *mcvs-types*)  
                 (let ((edited-types (types-read *mcvs-types*)))  
                   (types-sanity-check edited-types)  
                   (types-write edited-types *mcvs-types*)  
                   (setf types edited-types))  
                 (return))  
               (retry ()  
                 :report "Correct file type treatment, try again.")  
               (restore-types ()  
                 :report "Revert to original file treatment and edit again."  
                 (types-write types *mcvs-types* :comments *types-comments*)))))  
40    
41          ;; User has edited, so now we must honor all of the :IGNORE          ;; User has edited, so now we must honor all of the :IGNORE
42          ;; entries in the types, and remove the matching files from the          ;; entries in the types, and remove the matching files from the
43          ;; mapping.          ;; mapping.
44          (let ((ignores (mapcan #'(lambda (type-spec)          (setf filemap (types-remove-ignores types filemap))
                                    (if (eq (second type-spec) :ignore)  
                                      (list (first type-spec))))  
                                types)))  
           (setf filemap (remove-if #'(lambda (name)  
                                        (member (suffix name)  
                                                ignores :test #'path-equal))  
                                    filemap :key #'first)))  
45    
46          ;; Create F-files by hard linking          ;; Create F-files by hard linking
47          (dolist (item filemap)          (dolist (item filemap)

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.5