ViewVC logotype

Contents of /meta-cvs/F-A7A64FB1054A27E5F51A7E95C6A80309

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.32 - (hide annotations)
Tue Nov 28 04:12:08 2006 UTC (7 years, 4 months ago) by kaz
Branch: MAIN
Changes since 1.31: +7 -7 lines
Getting rid of mcvs- prefixes.

* code/package.lisp (defpackage): shadow the merge symbol.

* code/purge.lisp (mcvs-purge): renamed to purge
(mcvs-purge-wrapper): renamed to purge-wrapper

* code/restore.lisp (mcvs-restore): renamed to restore
(mcvs-restore-wrapper): renamed to restore-wrapper

* code/update.lisp (mcvs-update): renamed to update
(mcvs-update-wrapper): renamed to update-wrapper

* code/main.lisp (mcvs-help): renamed to help
(*mcvs-command-table*): renamed to *command-table*
(mcvs-terminate catch): renamed to terminate.

* code/execute.lisp (mcvs-execute): renamed to execute

* code/move.lisp (mcvs-move): renamed to move
(mcvs-move-wrapper): renamed to move-wrapper

* code/grab.lisp (mcvs-grab): renamed to grab
(mcvs-grab-wrapper): renamed to grab-wrapper

* code/prop.lisp (mcvs-prop): renamed to prop
(mcvs-prop-wrapper): renamed to prop-wrapper

* code/filt.lisp (mcvs-filt-loop): renamed to filt-loop
(mcvs-filt): renamed to filt
(mcvs-remote-filt): renamed to remote-filt
(mcvs-filt-wrapper): renamed to filt-wrapper
(mcvs-remote-filt-wrapper): renamed to remote-filt-wrapper

* code/branch.lisp (mcvs-branch): renamed to branch
(mcvs-branch-wrapper): renamed to branch-wrapper
(mcvs-merge): renamed to merge
(mcvs-list-branches): renamed to list-branches
(mcvs-merge-wrapper): renamed to merge-wrapper
(mcvs-remerge-wrapper): renamed to remerge-wrapper
(mcvs-list-branches-wrapper): renamed to list-branches-wrapper
(mcvs-switch-wrapper): renamed to switch-wrapper

* code/link.lisp (mcvs-link): renamed to ln
(mcvs-link-wrapper): renamed to link-wrapper

* code/watch.lisp (mcvs-watch): renamed to watch
(mcvs-watch-wrapper): renamed to watch-wrapper

* code/add.lisp (mcvs-add): renamed to add
(mcvs-add-wrapper): renamed to add-wrapper

* code/remove.lisp (mcvs-remove): renamed to rm
(mcvs-remove-wrapper): renamed to remove-wrapper

* code/convert.lisp (mcvs-convert): renamed to convert
(mcvs-convert-wrapper): renamed to convert-wrapper

* code/error.lisp (mcvs-terminate): renamed to terminate
(mcvs-error-handler): renamed to error-handler
(*mcvs-error-treatment*): renamed to *error-treatment*
(*mcvs-errors-occured-p*): renamed to *errors-occured-p*

* code/checkout.lisp (mcvs-checkout): renamed to checkout
(mcvs-checkout-wrapper): renamed to checkout-wrapper
(mcvs-export-wrapper): renamed to export-wrapper

* code/generic.lisp (mcvs-generic): renamed to generic
(mcvs-commit-wrapper): renamed to commit-wrapper
(mcvs-diff-wrapper): renamed to diff-wrapper
(mcvs-tag-wrapper): renamed to tag-wrapper
(mcvs-log-wrapper): renamed to log-wrapper
(mcvs-status-wrapper): renamed to status-wrapper
(mcvs-annotate-wrapper): renamed to annotate-wrapper
(mcvs-watchers-wrapper): renamed to watchers-wrapper
(mcvs-edit-wrapper): renamed to edit-wrapper
(mcvs-unedit-wrapper): renamed to unedit-wrapper
(mcvs-editors-wrapper): renamed to editors-wrapper
(mcvs-sync-to-wrapper): renamed to sync-to-wrapper
(mcvs-sync-from-wrapper): renamed to sync-from-wrapper

* code/create.lisp (mcvs-create): renamed to create
(mcvs-create-wrapper): renamed to create-wrapper

* code/remap.lisp (mcvs-remap): renamed to remap
(mcvs-remap-wrapper): renamed to remap-wrapper

* code/mapping.lisp (mcvs-locate): renamed to locate
1 kaz 1.7 ;;; This source file is part of the Meta-CVS program,
2 kaz 1.5 ;;; which is distributed under the GNU license.
3     ;;; Copyright 2002 Kaz Kylheku
5 kaz 1.31 (in-package :meta-cvs)
6 kaz 1.1
7 kaz 1.32 (defun checkout (module &optional subdir cvs-options checkout-options
8     &key no-generate behave-like-export)
9 kaz 1.25 (when subdir
10     (when (path-absolute-p subdir)
11 kaz 1.26 (error "subdirectory path must be relative"))
12 kaz 1.25 (multiple-value-bind (canon-subdir out-of-bounds)
13     (canonicalize-path subdir)
14     (declare (ignore canon-subdir))
15     (when out-of-bounds
16 kaz 1.26 (error "subdirectory path ~a leads outside of module."
17 kaz 1.25 subdir))))
18 kaz 1.13 (find-bind (:key #'first :test #'string= :take #'second)
19 kaz 1.23 (cvs-checkout-options (dir "d" (or subdir module)))
20 kaz 1.13 checkout-options
21 kaz 1.19 (let ((checkout-dir (canonicalize-path dir))
22 kaz 1.22 path checkout-okay created-dir created-mcvs-dir)
23 kaz 1.19 (multiple-value-setq (path created-dir)
24     (ensure-directories-exist (path-cat checkout-dir *mcvs-dir*)))
25     (unwind-protect
26     (current-dir-restore
27     (chdir checkout-dir)
28 kaz 1.13
29 kaz 1.19 (when (ignore-errors (stat *mcvs-dir*))
30 kaz 1.26 (error "directory ~a seems to be the root of an existing sandbox."
31 kaz 1.19 checkout-dir))
32 kaz 1.18
33 kaz 1.19 (chatter-debug "Invoking CVS.~%")
34 kaz 1.20 (unless
35     (execute-program `("cvs" ,@(format-opt cvs-options)
36 kaz 1.27 ,(if behave-like-export "export" "checkout")
37     "-d" ,*mcvs-dir*
38 kaz 1.20 ,@(format-opt cvs-checkout-options) ,module))
39     (error "CVS checkout failed."))
40 kaz 1.18
41 kaz 1.20 (unless (ignore-errors (stat *mcvs-dir*))
42 kaz 1.26 (error "checkout failed to create ~a directory."
43 kaz 1.19 *mcvs-dir*))
44 kaz 1.13
45 kaz 1.22 (setf created-mcvs-dir t)
46 kaz 1.21 (mapping-write nil *mcvs-map-local*)
47 kaz 1.23 (if subdir
48     (displaced-path-write (concatenate 'string
49     (canonicalize-path subdir)
50     *path-sep*)))
51 kaz 1.20 (unless no-generate
52 kaz 1.23 (in-sandbox-root-dir
53     (chatter-debug "Generating file structure.~%")
54     (mapping-update)))
55 kaz 1.20 (chatter-info "Checkout to directory ~a completed.~%" checkout-dir)
56 kaz 1.19 (setf checkout-okay t))
57 kaz 1.27 (when (or behave-like-export (not checkout-okay))
58     (when created-mcvs-dir
59     (delete-recursive (path-cat checkout-dir *mcvs-dir*))))
60 kaz 1.20 (unless checkout-okay
61     (when created-dir
62     (delete-recursive checkout-dir))))
63 kaz 1.17 (values))))
64 kaz 1.2
65 kaz 1.27 (flet ((err ()
66     (error "specify module, and optional subdirectory")))
67 kaz 1.32 (defun checkout-wrapper (global-options command-options args)
68 kaz 1.27 (when (< (length args) 1)
69     (err))
70     (destructuring-bind (module &optional subdir &rest superfluous) args
71     (when superfluous
72     (err))
73 kaz 1.32 (checkout module subdir global-options command-options)))
74 kaz 1.27
75 kaz 1.32 (defun export-wrapper (global-options command-options args)
76 kaz 1.27 (when (< (length args) 1)
77     (err))
78     (destructuring-bind (module &optional subdir &rest superfluous) args
79     (when superfluous
80     (err))
81     (find-bind (:test #'string= :key #'first)
82     ((revision "r")
83     (date "D"))
84     command-options
85     (cond
86     ((not (or revision date))
87     (error "specify tag with -r or date with -D."))
88     ((and revision date)
89     (error "both -r and -D specified.")))
91 kaz 1.32 (checkout module subdir global-options command-options
92     :behave-like-export t)))))
93 kaz 1.24
94     (defconstant *checkout-help*
95     "Syntax:
97     mcvs co [ options ] module-name [ subdirectory-path ]
99     Options:
101     -f Force a head revision match if tag or date is not found.
102     -r revision Check out specific revision or branch and make it sticky.
103     -D date Check out by date.
104     -d dir Check out into specified directory instead of creating
105     a directory based on the module name.
106     -k key-expansion Specify RCS keyword expansion option.
107     -j revision Merge in the changes between current revision and rev.
108     Note that Meta-CVS has branch and merge commands; using
109     the -j options of checkout or update bypasses the
110     Meta-CVS merge system.
112     Semantics:
114     The checkout command retrieves a module from Meta-CVS to form a working copy,
115     also known as a ``sandbox'' in version control jargon.
117     By default, a subdirectory is created whose name is the same as the
118     module-name. The module's directory structure is unfolded down there. An
119     alternate directory can be specified with the -d option. Meta-CVS will
120     try to create the checkout directory if it does not exist. Populating
121     an existing directory is safe; Meta-CVS will stop if it encounters
122     any conflicting local files.
124     If the optional subdirectory-path parameter is specified, Meta-CVS will
125     create a ``partial sandbox'', whose root directory is the specified
126     path. This parameter is understood to be a relative path within the
127     module's tree structure, resolved with respect to the root. For example
128     if the module has a lib/zlib subdirectory, then specifying lib/zlib
129     will create a sandbox whose root directory corresponds to lib/zlib.
130     Files not under lib/zlib won't be visible in the sandbox. A nonexistent
131     path can be specified; in that case the partial sandbox will be empty. Adding
132     new files within the sandbox will cause the path to exist. For example,
133     if the module contains no directory called lib/libdes it's still possible
134     to check out that directory. Then adding a file called foo.c in the
135     root directory of the sandbox will actually add a lib/libdes/foo.c file
136     to the module.")
137 kaz 1.27
138     (defconstant *export-help*
139     "Syntax:
141 kaz 1.28 mcvs export { -D date | -r revision } [ options ]
142     module-name [ subdirectory-path ]
143 kaz 1.27
144     Options:
146     -f Force a head revision match if tag or date is not found.
147     -r revision Check out specific revision or branch and make it sticky.
148     -D date Check out by date.
149     -d dir Check out into specified directory instead of creating
150     a directory based on the module name.
151     -k key-expansion Specify RCS keyword expansion option.
153     Semantics:
155 kaz 1.28 The export command is almost the same as the checkout command. Unlike
156     checkout, export does not create a MCVS subdirectory, and so the result is
157     not a working copy. It requires that a document baseline be specified by
158     symbolic revision or date. Lastly, it does not accept the -j option to
159     specify merging (but this way of merging on checkout is deprecated in
160     Meta-CVS; do not use it with managed branches).")

  ViewVC Help
Powered by ViewVC 1.1.5