Fossil

Check-in [2929a438ef]
Login

Check-in [2929a438ef]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Extended option processing, added handling of verbosity/quietness.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2929a438ef9d030b6f421b652c1544da2d25d5d4
User & Date: aku 2007-10-04 04:32:49.000
Context
2007-10-04
04:34
Continued work on pass I. Filled in the repository management, and basic implementation of project objects. Missing are persistence and the foundation for that (cache database). ... (check-in: 52f2254007 user: aku tags: trunk)
04:32
Extended option processing, added handling of verbosity/quietness. ... (check-in: 2929a438ef user: aku tags: trunk)
2007-10-03
04:18
Added stub for repository management, added most of pass I, collecting archives in the repository. ... (check-in: 47740cc1f6 user: aku tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tools/cvs2fossil/lib/c2f_option.tcl.
17
18
19
20
21
22
23

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

65
66
67
68
69
70
71
72
73
74




75
76
77
78
79
80
81
82
83
84
85
86
87
88

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.4                               ; # Required runtime.
package require snit                                  ; # OO system.
package require vc::tools::trouble                    ; # Error reporting.

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

# # ## ### ##### ######## ############# #####################
## 

snit::type ::vc::fossil::import::cvs::option {
    # # ## ### ##### ######## #############
    ## Public API, Options.

    # --help, --help-passes, -h
    # --version
    # -p, --pass, --passes
    # --ignore-conflicting-attics

    # --project



    # --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} {
	# Syntax of arguments: ?option ?value?...? /path/to/cvs/repository

	while {[IsOption arguments -> option]} {
	    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]




		}
		--cache       {
		    # [Value arguments]
		}
		default {
		    Usage $badoption$option\n$gethelp
		}
	    }
	}

	if {[llength $arguments] > 1} Usage
	if {[llength $arguments] < 1} { Usage $nocvs }
	repository base [lindex $arguments 0]








>















<

>
>
>









<
<













>
|
|
<
|
|
|
<
|
<
|
>
>
>
>
|



<
|
<







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

40
41
42
43
44
45
46
47
48
49
50
51
52


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

69
70
71

72

73
74
75
76
77
78
79
80
81

82

83
84
85
86
87
88
89

# # ## ### ##### ######## ############# #####################
## 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

# # ## ### ##### ######## ############# #####################
## 

snit::type ::vc::fossil::import::cvs::option {
    # # ## ### ##### ######## #############
    ## Public API, Options.

    # --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



    # # ## ### ##### ######## #############
    ## Public API, Methods

    typemethod process {arguments} {
	# Syntax of arguments: ?option ?value?...? /path/to/cvs/repository

	while {[IsOption arguments -> option]} {
	    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] }
		-v        -
		--verbose { log verbose }
		-q        -
		--quiet   { log quiet }

		--cache       {
		    # [Value arguments]
		}

		default { Usage $badoption$option\n$gethelp }

	    }
	}

	if {[llength $arguments] > 1} Usage
	if {[llength $arguments] < 1} { Usage $nocvs }
	repository base [lindex $arguments 0]

182
183
184
185
186
187
188

189
190
191
192
193
194
195
196
197
198
199
    # # ## ### ##### ######## #############
}

namespace eval ::vc::fossil::import::cvs {
    namespace export option
    namespace eval option {
	namespace import ::vc::tools::trouble

	namespace import ::vc::fossil::import::cvs::pass
	namespace import ::vc::fossil::import::cvs::pass::collar
	namespace import ::vc::fossil::import::cvs::repository
    }
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide vc::fossil::import::cvs::option 1.0
return







>











183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
    # # ## ### ##### ######## #############
}

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
    }
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide vc::fossil::import::cvs::option 1.0
return