Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_option.tcl part of check-in [47740cc1f6] - Added stub for repository management, added most of pass I, collecting archives in the repository. by aku on 2007-10-03 04:18:18. [view]

To:

File tools/cvs2fossil/lib/c2f_option.tcl part of check-in [2929a438ef] - Extended option processing, added handling of verbosity/quietness. by aku on 2007-10-04 04:32:49. [view]

@@ -20,8 +20,9 @@
 
 package require Tcl 8.4                               ; # Required runtime.
 package require snit                                  ; # OO system.
 package require vc::tools::trouble                    ; # Error reporting.
+package require vc::tools::log                        ; # User feedback.
 package require vc::fossil::import::cvs::pass         ; # Pass management
 package require vc::fossil::import::cvs::pass::collar ; # Pass I.
 package require vc::fossil::import::cvs::repository   ; # Repository management
 
@@ -35,10 +36,12 @@
     # --help, --help-passes, -h
     # --version
     # -p, --pass, --passes
     # --ignore-conflicting-attics
-
     # --project
+    # -v, --verbose
+    # -q, --quiet
+
     # --cache (conversion status, ala config.cache)
     # -o, --output
     # --dry-run
     # --trunk-only
@@ -46,10 +49,8 @@
     # --force-tag RE
     # --symbol-transform RE:XX
     # --exclude
     # -p, --passes
-    # -v, --verbose
-    # -q, --quiet
 
     # # ## ### ##### ######## #############
     ## Public API, Methods
 
@@ -61,25 +62,25 @@
 		-h            -
 		--help        { PrintHelp    ; exit 0 }
 		--help-passes { pass help    ; exit 0 }
 		--version     { PrintVersion ; exit 0 }
-		-p            -
-		--pass        -
-		--passes      {
-		    pass select [Value arguments]
-		}
-		--ignore-conflicting-attics {
-		    collar ignore_conflicting_attics
-		}
-		--project     {
-		    repository add [Value arguments]
-		}
+
+		-p                          -
+		--pass                      -
+		--passes                    { pass select [Value arguments] }
+
+		--ignore-conflicting-attics { collar ignore_conflicting_attics }
+
+		--project { repository add [Value arguments] }
+		-v        -
+		--verbose { log verbose }
+		-q        -
+		--quiet   { log quiet }
+
 		--cache       {
 		    # [Value arguments]
 		}
-		default {
-		    Usage $badoption$option\n$gethelp
-		}
+		default { Usage $badoption$option\n$gethelp }
 	    }
 	}
 
 	if {[llength $arguments] > 1} Usage
@@ -185,8 +186,9 @@
 namespace eval ::vc::fossil::import::cvs {
     namespace export option
     namespace eval option {
 	namespace import ::vc::tools::trouble
+	namespace import ::vc::tools::log
 	namespace import ::vc::fossil::import::cvs::pass
 	namespace import ::vc::fossil::import::cvs::pass::collar
 	namespace import ::vc::fossil::import::cvs::repository
     }