Fossil

Check-in [4e7dd05fc6]
Login

Check-in [4e7dd05fc6]

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

Overview
Comment:Added an option "--batch" with which the user can disable the feedback display standard to interactive use.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4e7dd05fc61d66c0d009eb19bdb6c4c26687c819
User & Date: aku 2007-11-17 04:39:27.000
Context
2007-11-20
06:59
Added the ability to export the changeset graphs processed by the passes 6 to 8 using GraphViz's dot-format. This is activated by using the switch '--dots'. Bugfixes in the cycle breaker. First corrected variable names, I forgot to use the standard 'myXXX' format for the typevariables. Second, fixed a bug uncovered by looking at the exported graphs, which caused the system to loose arcs, possibly breaking cycles without actually breaking them, leaving them in the dependencies. ... (check-in: 7f15be9078 user: aku tags: trunk)
2007-11-17
04:39
Added an option "--batch" with which the user can disable the feedback display standard to interactive use. ... (check-in: 4e7dd05fc6 user: aku tags: trunk)
2007-11-16
08:32
Added convenience command to the state package when the sql returns a single row. Added more statistics about revisions, tags, branches, symbols, changesets to various passes. ... (check-in: 96b7bfb834 user: aku tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tools/cvs2fossil/lib/c2f_option.tcl.
42
43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60
    # --ignore-conflicting-attics
    # --project
    # -v, --verbose
    # -q, --quiet
    # --state (conversion status, ala config.cache)
    # --trunk-only
    # --exclude, --force-tag, --force-branch


    # -o, --output
    # --dry-run
    # --force-branch RE
    # --force-tag RE
    # --symbol-transform RE:XX

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

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







>



<
<







42
43
44
45
46
47
48
49
50
51
52


53
54
55
56
57
58
59
    # --ignore-conflicting-attics
    # --project
    # -v, --verbose
    # -q, --quiet
    # --state (conversion status, ala config.cache)
    # --trunk-only
    # --exclude, --force-tag, --force-branch
    # --batch

    # -o, --output
    # --dry-run


    # --symbol-transform RE:XX

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

    typemethod process {arguments} {
	# Syntax of arguments: ?option ?value?...? /path/to/cvs/repository
75
76
77
78
79
80
81

82
83
84
85
86
87
88
		-q                          -
		--quiet                     { log quiet }
		--state                     { state use [Value arguments] }
		--trunk-only                { repository trunkonly! }
		--exclude                   { project::sym exclude     [Value arguments] }
		--force-tag                 { project::sym forcetag    [Value arguments] }
		--force-branch              { project::sym forcebranch [Value arguments] }

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

	if {[llength $arguments] > 1} Usage







>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
		-q                          -
		--quiet                     { log quiet }
		--state                     { state use [Value arguments] }
		--trunk-only                { repository trunkonly! }
		--exclude                   { project::sym exclude     [Value arguments] }
		--force-tag                 { project::sym forcetag    [Value arguments] }
		--force-branch              { project::sym forcebranch [Value arguments] }
		--batch                     { log noprogress }
		default {
		    Usage $badoption$option\n$gethelp
		}
	    }
	}

	if {[llength $arguments] > 1} Usage
103
104
105
106
107
108
109


110
111
112
113
114
115
116
	trouble info "  Information options"
	trouble info ""
	trouble info "    -h, --help    Print this message and exit with success"
	trouble info "    --help-passes Print list of passes and exit with success"
	trouble info "    --version     Print version number of $argv0"
	trouble info "    -v, --verbose Increase application's verbosity"
	trouble info "    -q, --quiet   Decrease application's verbosity"


	trouble info ""
	trouble info "  Conversion control options"
	trouble info ""
	trouble info "    -p, --pass PASS            Run only the specified conversion pass"
	trouble info "    -p, --passes ?START?:?END? Run only the passes START through END,"
	trouble info "                               inclusive."
	trouble info ""







>
>







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	trouble info "  Information options"
	trouble info ""
	trouble info "    -h, --help    Print this message and exit with success"
	trouble info "    --help-passes Print list of passes and exit with success"
	trouble info "    --version     Print version number of $argv0"
	trouble info "    -v, --verbose Increase application's verbosity"
	trouble info "    -q, --quiet   Decrease application's verbosity"
	trouble info "    --batch       Disable the progress feedback standard to"
	trouble info "                  interactive use."
	trouble info ""
	trouble info "  Conversion control options"
	trouble info ""
	trouble info "    -p, --pass PASS            Run only the specified conversion pass"
	trouble info "    -p, --passes ?START?:?END? Run only the passes START through END,"
	trouble info "                               inclusive."
	trouble info ""
Changes to tools/cvs2fossil/lib/log.tcl.
38
39
40
41
42
43
44

45
46
47
48
49
50
51

    # Similar to write, especially in the handling of the verbosity,
    # to drive progress displays. It signals that for some long
    # running operation we are at tick 'n' of at most 'max' ticks. An
    # empty 'max' indicates an infinite progress display.

    typemethod progress {verbosity system n max} {

	if {$verbosity > $myloglevel} return
	uplevel #0 [linsert $mylogcmd end progress [System $system] $n $max]
	return
    }

    typemethod visible? {verbosity} {
	return [expr {$verbosity <= $myloglevel}]







>







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

    # Similar to write, especially in the handling of the verbosity,
    # to drive progress displays. It signals that for some long
    # running operation we are at tick 'n' of at most 'max' ticks. An
    # empty 'max' indicates an infinite progress display.

    typemethod progress {verbosity system n max} {
	if {!$myprogress}             return
	if {$verbosity > $myloglevel} return
	uplevel #0 [linsert $mylogcmd end progress [System $system] $n $max]
	return
    }

    typemethod visible? {verbosity} {
	return [expr {$verbosity <= $myloglevel}]
63
64
65
66
67
68
69





70
71
72
73
74
75
76
	return
    }

    typemethod verbose {} {
	incr myloglevel
	return
    }






    typemethod quiet {} {
	if {$myloglevel < 1} return
	incr myloglevel -1
	return
    }








>
>
>
>
>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
	return
    }

    typemethod verbose {} {
	incr myloglevel
	return
    }

    typemethod noprogress {} {
	set myprogress 0
	return
    }

    typemethod quiet {} {
	if {$myloglevel < 1} return
	incr myloglevel -1
	return
    }

102
103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
    }

    # # ## ### ##### ######## #############
    ## Internal, state

    typevariable myloglevel 2                     ; # Some verbosity, not too much
    typevariable mylogcmd   ::vc::tools::log::OUT ; # Standard output to stdout.
    typevariable mysysfmt %s                      ; # Non-tabular formatting.
    typevariable mysyslen 0                       ; # Ditto.


    # # ## ### ##### ######## #############
    ## Internal, helper methods (formatting, dispatch)

    proc System {s} {
	::variable mysysfmt
	return [format $mysysfmt $s]







|
|
>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
    }

    # # ## ### ##### ######## #############
    ## Internal, state

    typevariable myloglevel 2                     ; # Some verbosity, not too much
    typevariable mylogcmd   ::vc::tools::log::OUT ; # Standard output to stdout.
    typevariable mysysfmt   %s                    ; # Non-tabular formatting.
    typevariable mysyslen   0                     ; # Ditto.
    typevariable myprogress 1                     ; # Progress output is standard.

    # # ## ### ##### ######## #############
    ## Internal, helper methods (formatting, dispatch)

    proc System {s} {
	::variable mysysfmt
	return [format $mysysfmt $s]