Overview
SHA1 Hash: | 2929a438ef9d030b6f421b652c1544da2d25d5d4 |
---|---|
Date: | 2007-10-04 04:32:49 |
User: | aku |
Comment: | Extended option processing, added handling of verbosity/quietness. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/cvs2fossil/lib/c2f_option.tcl from [08855f1e15] to [79fff162dc].
@@ -19,10 +19,11 @@ ## Requirements 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 # # ## ### ##### ######## ############# ##################### @@ -34,23 +35,23 @@ # --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 # --force-branch RE # --force-tag RE # --symbol-transform RE:XX # --exclude # -p, --passes - # -v, --verbose - # -q, --quiet # # ## ### ##### ######## ############# ## Public API, Methods typemethod process {arguments} { @@ -60,27 +61,27 @@ switch -exact -- $option { -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 if {[llength $arguments] < 1} { Usage $nocvs } @@ -184,10 +185,11 @@ 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 } }