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

Diff of /meta-cvs/F-A7A64FB1054A27E5F51A7E95C6A80309

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

revision 1.26 by kaz, Sat Oct 5 18:09:48 2002 UTC revision 1.26.2.2 by kaz, Sat Oct 26 21:09:27 2002 UTC
# Line 10  Line 10 
10  (provide "checkout")  (provide "checkout")
11    
12  (defun mcvs-checkout (module &optional subdir cvs-options checkout-options  (defun mcvs-checkout (module &optional subdir cvs-options checkout-options
13                               &key no-generate)                               &key no-generate behave-like-export)
14    (when subdir    (when subdir
15      (when (path-absolute-p subdir)      (when (path-absolute-p subdir)
16        (error "subdirectory path must be relative"))        (error "subdirectory path must be relative"))
# Line 38  Line 38 
38            (chatter-debug "Invoking CVS.~%")            (chatter-debug "Invoking CVS.~%")
39            (unless            (unless
40              (execute-program `("cvs" ,@(format-opt cvs-options)              (execute-program `("cvs" ,@(format-opt cvs-options)
41                                 "checkout" "-d" ,*mcvs-dir*                                 ,(if behave-like-export "export" "checkout")
42                                   "-d" ,*mcvs-dir*
43                                 ,@(format-opt cvs-checkout-options) ,module))                                 ,@(format-opt cvs-checkout-options) ,module))
44              (error "CVS checkout failed."))              (error "CVS checkout failed."))
45    
# Line 58  Line 59 
59                (mapping-update)))                (mapping-update)))
60            (chatter-info "Checkout to directory ~a completed.~%" checkout-dir)            (chatter-info "Checkout to directory ~a completed.~%" checkout-dir)
61            (setf checkout-okay t))            (setf checkout-okay t))
62          (unless checkout-okay          (when (or behave-like-export (not checkout-okay))
63            (when created-mcvs-dir            (when created-mcvs-dir
64              (delete-recursive (path-cat checkout-dir *mcvs-dir*)))              (delete-recursive (path-cat checkout-dir *mcvs-dir*))))
65            (unless checkout-okay
66            (when created-dir            (when created-dir
67              (delete-recursive checkout-dir))))              (delete-recursive checkout-dir))))
68        (values))))        (values))))
69    
70  (defun mcvs-checkout-wrapper (cvs-options cvs-command-options mcvs-args)  (flet ((err ()
71    (if (< (length mcvs-args) 1)           (error "specify module, and optional subdirectory")))
72      (error "specify module, and optional subdirectory."))    (defun mcvs-checkout-wrapper (global-options command-options args)
73    (destructuring-bind (module &optional subdir &rest superfluous) mcvs-args      (when (< (length args) 1)
74      (when superfluous        (err))
75        (error "specify one module and optional subdirectory to check out."))      (destructuring-bind (module &optional subdir &rest superfluous) args
76      (mcvs-checkout module subdir cvs-options cvs-command-options)))        (when superfluous
77            (err))
78          (mcvs-checkout module subdir global-options command-options)))
79    
80      (defun mcvs-export-wrapper (global-options command-options args)
81          (when (< (length args) 1)
82            (err))
83          (destructuring-bind (module &optional subdir &rest superfluous) args
84            (when superfluous
85              (err))
86            (find-bind (:test #'string= :key #'first)
87                       ((revision "r")
88                        (date "D"))
89                       command-options
90              (cond
91                ((not (or revision date))
92                   (error "specify tag with -r or date with -D."))
93                ((and revision date)
94                   (error "both -r and -D specified.")))
95    
96              (mcvs-checkout module subdir global-options command-options
97                             :behave-like-export t)))))
98    
99  (defconstant *checkout-help*  (defconstant *checkout-help*
100  "Syntax:  "Syntax:
# Line 116  Semantics: Line 139  Semantics:
139    to check out that directory. Then adding a file called foo.c in the    to check out that directory. Then adding a file called foo.c in the
140    root directory of the sandbox will actually add a lib/libdes/foo.c file    root directory of the sandbox will actually add a lib/libdes/foo.c file
141    to the module.")    to the module.")
142    
143    (defconstant *export-help*
144    "Syntax:
145    
146      mcvs export { -D date | -r revision } [ options ]
147           module-name [ subdirectory-path ]
148    
149    Options:
150    
151      -f                Force a head revision match if tag or date is not found.
152      -r revision       Check out specific revision or branch and make it sticky.
153      -D date           Check out by date.
154      -d dir            Check out into specified directory instead of creating
155                        a directory based on the module name.
156      -k key-expansion  Specify RCS keyword expansion option.
157    
158    Semantics:
159    
160      The export command is almost the same as the checkout command. Unlike
161      checkout, export does not create a MCVS subdirectory, and so the result is
162      not a working copy.  It requires that a document baseline be specified by
163      symbolic revision or date.  Lastly, it does not accept the -j option to
164      specify merging (but this way of merging on checkout is deprecated in
165      Meta-CVS; do not use it with managed branches).")

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.26.2.2

  ViewVC Help
Powered by ViewVC 1.1.5