/[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.32 by kaz, Sun Mar 10 03:32:47 2002 UTC revision 1.33 by kaz, Tue Mar 12 18:53:46 2002 UTC
# Line 15  Line 15 
15  (require "restart")  (require "restart")
16  (require "error")  (require "error")
17  (require "options")  (require "options")
18    (require "find-bind")
19  (provide "mcvs-main")  (provide "mcvs-main")
20    
21  (defconstant *cvs-options*  (defconstant *cvs-options*
22   '("H" "help" "Q" "q" "r" "w" "l" "n" "t" "v" "f" "a" "version"   '("H" "help" "Q" "q" "r" "w" "l" "n" "t" "v" "f" "version"
23     "nometa"))     "nometa"))
24    
25  (defconstant *cvs-options-arg* '("T" "e" "d" "z" "s"))  (defconstant *cvs-options-arg* '("T" "e" "d" "r" "z" "s"))
26    
27  (defconstant *import-options* '(("d") ("k" "I" "b" "m" "W")))  (defconstant *import-options* '(("d") ("k" "I" "b" "m" "W")))
28  (defconstant *checkout-options* '(("A" "N" "f") ("r" "D" "d" "k" "j")))  (defconstant *checkout-options* '(("A" "N" "f") ("r" "D" "d" "k" "j")))
# Line 76  Line 77 
77     ("fi" ,#'mcvs-filt-wrapper nil nil)     ("fi" ,#'mcvs-filt-wrapper nil nil)
78     ("convert" ,#'mcvs-convert-wrapper ,@*convert-options*)))     ("convert" ,#'mcvs-convert-wrapper ,@*convert-options*)))
79    
80    (defconstant *usage*
81    "Meta-CVS command syntax:
82    
83      mcvs global-options command command-options-and-arguments
84    
85    Global options:
86    
87      -H --help        Print this help and terminate. If a command is specified,
88                       help specific to that command is printed instead.
89      -Q               Very quiet, generate output only for serious problems. (*)
90      -q               Somewhat quiet, some informational messages suppresed. (*)
91      -r               Make working files read-only. (@)
92      -w               Make new working files read-write (default). (@)
93      -l               Do not log cvs command in command history, but execute
94                       it anyway. (@)
95      -t               Trace CVS execution. (@)
96      -v --version     Display version information and terminate.
97      -f               CVS not to read ~/.cvsrc file. (@)
98      --nometa         Do not add Meta-CVS metafiles to the set of
99                       files to commit, diff, stat, log or annotate.
100      -T tempdir       Place temporary files in tempdir. (@)
101      -e editor        Edit messages with editor. (@)
102      -d root          Specify CVSROOT. (@)
103      -z gzip-level    Specify compression level. (@)
104    
105      Notes: (*) option processed by Meta-CVS and passed to CVS too.
106             (@) option merely passed to CVS.
107    
108    Commands:
109    
110      import           Create new project from an existing file tree.
111      checkout (co)    Retrieve a Meta-CVS project from CVS and build
112                       working copy.
113      add              Place files (or directories with add -R) under
114                       version control.
115      remove (rm)      Remove files or directories.
116      move (mv)        Rename files and directories.
117      update (up)      Incorporate latest changes from repository into
118                       working copy.
119      commit (ci)      Incorporate outstanding changes in the working copy
120                       into the repository.
121      diff             Compute differences between files in the working copy
122                       and the repository or between revisions in the repository.
123      tag              Associate a symbolic name with file revisions to create
124                       an identifiable baseline.  By default, tags the
125                       revisions that were last synchronized with the
126                       directory. A branch is created using tag -b.
127      log              Display log information for files.
128      status (stat)    Show current status of files.
129      annotate         Perform a detailed analysis of files, showing the
130                       version information about every individual line of text.
131      filt (fi)        Act as a text filter, which converts Meta-CVS F- file names
132                       to human readable names, according to the current mapping.
133      convert          Convert a CVS module to a Meta-CVS project. This requires
134                       filesystem-level access to the repository. This is
135                       currently an experimental command that is known not
136                       to work 100%.")
137    
138  (defun mcvs-execute (args)  (defun mcvs-execute (args)
139    (handler-bind ((error #'mcvs-error-handler))    (handler-bind ((error #'mcvs-error-handler))
140      (multiple-value-bind (global-options global-args)      (multiple-value-bind (global-options global-args)
141                           (parse-opt args *cvs-options*                           (parse-opt args *cvs-options*
142                                      *cvs-options-arg* "mcvs")                                      *cvs-options-arg* "mcvs")
       (when (not (first global-args))  
         (error "mcvs: requires arguments."))  
143        (setf global-options (filter-global-options global-options))        (setf global-options (filter-global-options global-options))
144    
145          (find-bind (:test #'string= :key #'first)
146                     ((help-long "help") (help "H") (quiet "q")
147                      (very-quiet "Q") (version "v") (version-long "version"))
148                     global-options
149            (when (or help-long help)
150              (terpri)
151              (write-line *usage*)
152              (terpri)
153              (throw 'mcvs-terminate nil))
154            (when (or version version-long)
155              (let* ((vers (split-words "$Name$" "$:- "))
156                     (major (third vers))
157                     (minor (fourth vers)))
158                (if (and major minor)
159                  (format t "Meta-CVS version ~a.~a (c) 2002 Kaz Kylheku~%"
160                          major minor)
161                  (format t "Meta-CVS unknown version (c) 2002 Kaz Kylheku~%"))
162                (throw 'mcvs-terminate nil))))
163    
164          (when (not (first global-args))
165            (write-line "Meta-CVS requires arguments.")
166            (write-line "Use mcvs -H to view help.")
167            (throw 'mcvs-terminate nil))
168    
169        (let ((command (find (first global-args) *mcvs-command-table*        (let ((command (find (first global-args) *mcvs-command-table*
170                                                  :key #'first                                                  :key #'first
171                                                  :test #'string=)))                                                  :test #'string=)))

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.5