/[meta-cvs]/meta-cvs/F-233AD6EEE14894A7303F09519A2AB734
ViewVC logotype

Diff of /meta-cvs/F-233AD6EEE14894A7303F09519A2AB734

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

revision 1.69 by kaz, Sat Oct 5 18:09:48 2002 UTC revision 1.69.2.18 by kaz, Tue Apr 15 07:19:00 2003 UTC
# Line 2  Line 2 
2  ;;; which is distributed under the GNU license.  ;;; which is distributed under the GNU license.
3  ;;; Copyright 2002 Kaz Kylheku  ;;; Copyright 2002 Kaz Kylheku
4    
5    ;; Clear out requires for mcvs-upgrade to work right.
6    (setf *modules* nil)
7    
8  (require "create")  (require "create")
9  (require "checkout")  (require "checkout")
10  (require "grab")  (require "grab")
11  (require "add")  (require "add")
12  (require "remove")  (require "remove")
13  (require "move")  (require "move")
14    (require "link")
15  (require "update")  (require "update")
16  (require "filt")  (require "filt")
17  (require "generic")  (require "generic")
# Line 17  Line 21 
21  (require "purge")  (require "purge")
22  (require "restore")  (require "restore")
23  (require "prop")  (require "prop")
24    (require "watch")
25  (require "split")  (require "split")
26  (require "restart")  (require "restart")
27  (require "error")  (require "error")
# Line 24  Line 29 
29  (require "find-bind")  (require "find-bind")
30  (provide "mcvs-main")  (provide "mcvs-main")
31    
32  (define-option-constant *cvs-options*  (define-option-constant *global-options*
33    (0 arg "H" "help" "Q" "q" "r" "w" "l" "n" "t" "v" "f" "version"    (0 arg "H" "help" "Q" "q" "r" "w" "l" "n" "t" "v" "f" "version"
34           "meta" "metaonly" "nometa" "error-continue" "error-terminate"           "meta" "metaonly" "nometa" "error-continue" "error-terminate"
35           "debug")           "debug")
36    (1 arg "T" "e" "d" "r" "z" "s" "i"))    (1 arg "T" "e" "d" "r" "z" "s" "i" "up"))
37    
38  (define-option-constant *help-options*)  (define-option-constant *help-options*)
39    
# Line 44  Line 49 
49    (0 arg "f")    (0 arg "f")
50    (1 arg "r" "D" "d" "k" "j"))    (1 arg "r" "D" "d" "k" "j"))
51    
52    (define-option-constant *export-options*
53      (0 arg "f")
54      (1 arg "r" "D" "d" "k"))
55    
56  (define-option-constant *add-options*  (define-option-constant *add-options*
57    (0 arg "R")    (0 arg "R")
58    (1 arg "k" "m"))    (1 arg "k" "m"))
# Line 52  Line 61 
61    (0 arg "R"))    (0 arg "R"))
62    
63  (define-option-constant *update-options*  (define-option-constant *update-options*
64    (0 arg "A" "f" "p")    (0 arg "A" "C" "f" "p")
65    (1 arg "k" "r" "D" "j" "I" "W"))    (1 arg "k" "r" "D" "j" "I" "W"))
66    
67  (define-option-constant *switch-options*  (define-option-constant *switch-options*
# Line 94  Line 103 
103  (define-option-constant *filt-options*  (define-option-constant *filt-options*
104    (1 arg "r" "D"))    (1 arg "r" "D"))
105    
106    (define-option-constant *remote-filt-options*
107      (1 arg "r" "D"))
108    
109  (define-option-constant *move-options*)  (define-option-constant *move-options*)
110    (define-option-constant *link-options*)
111  (define-option-constant *convert-options*)  (define-option-constant *convert-options*)
112  (define-option-constant *branch-options*)  (define-option-constant *branch-options*)
113  (define-option-constant *merge-options*)  
114  (define-option-constant *remerge-options*)  (define-option-constant *merge-options*
115      (1 arg "k"))
116    
117    (define-option-constant *remerge-options*
118      (1 arg "k"))
119    
120  (define-option-constant *list-branches-options*)  (define-option-constant *list-branches-options*)
121  (define-option-constant *remap-options*)  (define-option-constant *remap-options*)
122  (define-option-constant *purge-options*)  (define-option-constant *purge-options*)
# Line 108  Line 126 
126    (1 arg "set" "clear" "remove")    (1 arg "set" "clear" "remove")
127    (2 arg "value"))    (2 arg "value"))
128    
129    (define-option-constant *watch-options*
130      (0 arg "on" "off")
131      (1 arg "add" "remove"))
132    
133    (define-option-constant *watchers-options*)
134    (define-option-constant *edit-options*)
135    (define-option-constant *unedit-options*)
136    (define-option-constant *editors-options*)
137    
138  (defun mcvs-help (global-options command-options args)  (defun mcvs-help (global-options command-options args)
139    (declare (special *usage* *mcvs-command-table*)    (declare (special *usage* *mcvs-command-table*)
140             (ignore global-options command-options))             (ignore global-options command-options))
# Line 139  Line 166 
166     ("grab" ,#'mcvs-grab-wrapper ,*grab-help* ,*grab-options*)     ("grab" ,#'mcvs-grab-wrapper ,*grab-help* ,*grab-options*)
167     ("checkout" ,#'mcvs-checkout-wrapper ,*checkout-help* ,*checkout-options*)     ("checkout" ,#'mcvs-checkout-wrapper ,*checkout-help* ,*checkout-options*)
168     ("co" ,#'mcvs-checkout-wrapper ,*checkout-help* ,*checkout-options*)     ("co" ,#'mcvs-checkout-wrapper ,*checkout-help* ,*checkout-options*)
169       ("export" ,#'mcvs-export-wrapper ,*export-help* ,*export-options*)
170       ("ex" ,#'mcvs-export-wrapper ,*export-help* ,*export-options*)
171     ("add" ,#'mcvs-add-wrapper ,*add-help* ,*add-options*)     ("add" ,#'mcvs-add-wrapper ,*add-help* ,*add-options*)
172     ("remove" ,#'mcvs-remove-wrapper ,*remove-help* ,*remove-options*)     ("remove" ,#'mcvs-remove-wrapper ,*remove-help* ,*remove-options*)
173     ("rm" ,#'mcvs-remove-wrapper ,*remove-help* ,*remove-options*)     ("rm" ,#'mcvs-remove-wrapper ,*remove-help* ,*remove-options*)
174     ("move" ,#'mcvs-move-wrapper nil ,*move-options*)     ("move" ,#'mcvs-move-wrapper ,*move-help* ,*move-options*)
175     ("mv" ,#'mcvs-move-wrapper nil ,*move-options*)     ("mv" ,#'mcvs-move-wrapper ,*move-help* ,*move-options*)
176       ("link" ,#'mcvs-link-wrapper ,*link-help* ,*link-options*)
177       ("ln" ,#'mcvs-link-wrapper ,*link-help* ,*link-options*)
178     ("update" ,#'mcvs-update-wrapper nil ,*update-options*)     ("update" ,#'mcvs-update-wrapper nil ,*update-options*)
179     ("up" ,#'mcvs-update-wrapper nil ,*update-options*)     ("up" ,#'mcvs-update-wrapper nil ,*update-options*)
180     ("commit" ,#'mcvs-commit-wrapper nil ,*commit-options*)     ("commit" ,#'mcvs-commit-wrapper nil ,*commit-options*)
# Line 156  Line 187 
187     ("annotate" ,#'mcvs-annotate-wrapper nil ,*annotate-options*)     ("annotate" ,#'mcvs-annotate-wrapper nil ,*annotate-options*)
188     ("filt" ,#'mcvs-filt-wrapper nil ,*filt-options*)     ("filt" ,#'mcvs-filt-wrapper nil ,*filt-options*)
189     ("fi" ,#'mcvs-filt-wrapper nil ,*filt-options*)     ("fi" ,#'mcvs-filt-wrapper nil ,*filt-options*)
190       ("remote-filt" ,#'mcvs-remote-filt-wrapper nil ,*remote-filt-options*)
191       ("rfilt" ,#'mcvs-remote-filt-wrapper nil ,*remote-filt-options*)
192       ("rfi" ,#'mcvs-remote-filt-wrapper nil ,*remote-filt-options*)
193     ("convert" ,#'mcvs-convert-wrapper nil ,*convert-options*)     ("convert" ,#'mcvs-convert-wrapper nil ,*convert-options*)
194     ("branch" ,#'mcvs-branch-wrapper nil ,*branch-options*)     ("branch" ,#'mcvs-branch-wrapper ,*branch-help* ,*branch-options*)
195     ("switch" ,#'mcvs-switch-wrapper nil ,*switch-options*)     ("switch" ,#'mcvs-switch-wrapper nil ,*switch-options*)
196     ("sw" ,#'mcvs-switch-wrapper nil ,*switch-options*)     ("sw" ,#'mcvs-switch-wrapper nil ,*switch-options*)
197     ("merge" ,#'mcvs-merge-wrapper nil ,*merge-options*)     ("merge" ,#'mcvs-merge-wrapper nil ,*merge-options*)
# Line 167  Line 201 
201     ("purge" ,#'mcvs-purge-wrapper nil ,*purge-options*)     ("purge" ,#'mcvs-purge-wrapper nil ,*purge-options*)
202     ("restore" ,#'mcvs-restore-wrapper nil ,*restore-options*)     ("restore" ,#'mcvs-restore-wrapper nil ,*restore-options*)
203     ("remap" ,#'mcvs-remap-wrapper nil ,*remap-options*)     ("remap" ,#'mcvs-remap-wrapper nil ,*remap-options*)
204     ("prop" ,#'mcvs-prop-wrapper nil ,*prop-options*)))     ("prop" ,#'mcvs-prop-wrapper nil ,*prop-options*)
205       ("watch" ,#'mcvs-watch-wrapper nil ,*watch-options*)
206       ("watchers" ,#'mcvs-watchers-wrapper nil ,*watchers-options*)
207       ("edit" ,#'mcvs-edit-wrapper nil ,*edit-options*)
208       ("unedit" ,#'mcvs-unedit-wrapper nil ,*unedit-options*)
209       ("editors" ,#'mcvs-editors-wrapper nil ,*editors-options*)))
210    
211  (defconstant *usage*  (defconstant *usage*
212  "Meta-CVS command syntax:  "Meta-CVS command syntax:
# Line 180  Global options: Line 219  Global options:
219                       help specific to that command is printed instead.                       help specific to that command is printed instead.
220    -Q                 Very quiet, generate output only for serious problems. (*)    -Q                 Very quiet, generate output only for serious problems. (*)
221    -q                 Somewhat quiet, some informational messages suppresed. (*)    -q                 Somewhat quiet, some informational messages suppresed. (*)
222      -n                 Dry run; do not modify filesystem. (*)
223    --debug            Verbose debug output; -Q and -q are ignored but still    --debug            Verbose debug output; -Q and -q are ignored but still
224                       passed to CVS.                       passed to CVS.
225    -r                 Make working files read-only. (@)    -r                 Make working files read-only. (@)
# Line 203  Global options: Line 243  Global options:
243    -e editor          Edit messages with editor. (*)    -e editor          Edit messages with editor. (*)
244    -d root            Specify CVSROOT. (@)    -d root            Specify CVSROOT. (@)
245    -z gzip-level      Specify compression level. (@)    -z gzip-level      Specify compression level. (@)
246      --up N             Escape out of N levels of sandbox nesting before executing
247                         operation.
248    
249    Notes: (*) option processed by Meta-CVS and passed to CVS too.    Notes: (*) option processed by Meta-CVS and passed to CVS too.
250           (@) option merely passed to CVS.           (@) option merely passed to CVS.
# Line 214  Commands: Line 256  Commands:
256    grab               Take a snapshot of an external source tree, such    grab               Take a snapshot of an external source tree, such
257                       as a third-party release, and incorporate it into                       as a third-party release, and incorporate it into
258                       the working copy. Tries to discover file moves.                       the working copy. Tries to discover file moves.
259    checkout (co)      Retrieve a Meta-CVS project from CVS and build    checkout (co)      Retrieve a Meta-CVS project from the repository to
260                         create a working copy.
261      export (ex)        Retrieve a Meta-CVS project without creating a
262                       working copy.                       working copy.
263    add                Place files (or directories with add -R) under    add                Place files (or directories with add -R) under
264                       version control.                       version control.
265    remove (rm)        Remove files or directories.    remove (rm)        Remove files or directories.
266    move (mv)          Rename files and directories.    move (mv)          Rename files and directories.
267      link (ln)          Create a versioned symbolic link.
268    update (up)        Incorporate latest changes from repository into    update (up)        Incorporate latest changes from repository into
269                       working copy.                       working copy.
270    commit (ci)        Incorporate outstanding changes in the working copy    commit (ci)        Incorporate outstanding changes in the working copy
# Line 236  Commands: Line 281  Commands:
281                       version information about every individual line of text.                       version information about every individual line of text.
282    filt (fi)          Act as a text filter, which converts Meta-CVS F- file    filt (fi)          Act as a text filter, which converts Meta-CVS F- file
283                       names to readable paths, according to the current mapping.                       names to readable paths, according to the current mapping.
284      remote-filt (rfi)  Remote version of filt, requires module name.
285    branch             Create a managed branch. Meta-CVS managed branches keep    branch             Create a managed branch. Meta-CVS managed branches keep
286                       track of what has been merged where, so users don't have                       track of what has been merged where, so users don't have
287                       to track merges with tags at all.                       to track merges with tags at all.
# Line 255  Commands: Line 301  Commands:
301                       directory under cryptic names.                       directory under cryptic names.
302    prop               Manipulate properties.    prop               Manipulate properties.
303                         prop --set <bool-prop-name> [ files ... ]                         prop --set <bool-prop-name> [ files ... ]
304                         prop --clear <bool-prop-name> [ files ... ]                         prop --clear <bool-prop-name> [ files ... ]
305                         prop --value <prop-name> <new-value> [ files ... ]                         prop --value <prop-name> <new-value> [ files ... ]
306                         prop --remove <prop-name> [ files ... ]                         prop --remove <prop-name> [ files ... ]
307                       The ``exec'' property represents the execute permission                       The ``exec'' property represents the execute permission
308                       of a file.  More than one --set, --clear, --value                       of a file.  More than one --set, --clear, --value
309                       or --remove may be specified before the files.                       or --remove may be specified before the files.
310      watch              Manipulate per-file CVS watch settings.
311                           watch --on [ files ... ]
312                           watch --off [ files ... ]
313                           watch --add <action> [ files ... ]
314                           watch --remove <action> [ files ... ]
315      watchers           See who is watching files.
316      edit               Indicate the intent to edit a watched file.
317      unedit             Retract the indication signaled by edit.
318      editors            See who is editing files.
319    convert            Convert a CVS module to a Meta-CVS project. This requires    convert            Convert a CVS module to a Meta-CVS project. This requires
320                       filesystem-level access to the repository. This is                       filesystem-level access to the repository. This is
321                       currently an experimental command that is known not                       currently an experimental command that is known not
322                       to work 100%.")                       to work 100%.")
323    
 (defvar *options*)  
 (defvar *args*)  
   
324  (defun mcvs-execute (args)  (defun mcvs-execute (args)
325    (handler-bind ((error #'mcvs-error-handler))    (handler-bind ((error #'mcvs-error-handler))
326      (multiple-value-bind (global-options global-args)      (multiple-value-bind (global-options global-args)
327                           (parse-opt args *cvs-options*)                           (parse-opt args *global-options*)
328        (setf global-options (filter-global-options global-options))        (setf global-options (filter-global-options global-options))
329    
330        (find-bind (:test #'string= :key #'first)        (when *print-usage*
331                   ((help-long "help") (help "H") (quiet "q")          (terpri)
332                    (very-quiet "Q") (version "v") (version-long "version")          (write-line *usage*)
333                    (editor "e") (interpret-file "i"))          (terpri)
334                   global-options          (throw 'mcvs-terminate nil))
         (setf *args* global-args)  
         (setf *options* global-options)  
         (when (or help-long help)  
           (terpri)  
           (write-line *usage*)  
           (terpri)  
           (throw 'mcvs-terminate nil))  
         (when (or version version-long)  
           (let* ((vers (split-words "$Name$" "$:- "))  
                  (major (third vers))  
                  (minor (fourth vers)))  
             (if (and major minor)  
               (format t "Meta-CVS version ~a.~a (c) 2002 Kaz Kylheku~%"  
                       major minor)  
               (format t "Meta-CVS unknown version (c) 2002 Kaz Kylheku~%"))  
             (throw 'mcvs-terminate nil)))  
         (when editor  
           (setf *editor* (second editor)))  
         (cond  
           (very-quiet (setf *mcvs-chatter-level* *mcvs-silent*))  
           (quiet (setf *mcvs-chatter-level* *mcvs-terse*)))  
         (when interpret-file  
           (load (second interpret-file))  
           (throw 'mcvs-terminate nil)))  
335    
336        (when (not (first global-args))        (when (not (first global-args))
337          (write-line "Meta-CVS requires a command argument.")          (write-line "Meta-CVS requires a command argument.")

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.69.2.18

  ViewVC Help
Powered by ViewVC 1.1.5