Fossil SCM

Added an option "--batch" with which the user can disable the feedback display standard to interactive use.

aku 2007-11-17 04:39 trunk
Commit 4e7dd05fc61d66c0d009eb19bdb6c4c26687c819
--- tools/cvs2fossil/lib/c2f_option.tcl
+++ tools/cvs2fossil/lib/c2f_option.tcl
@@ -44,15 +44,14 @@
4444
# -v, --verbose
4545
# -q, --quiet
4646
# --state (conversion status, ala config.cache)
4747
# --trunk-only
4848
# --exclude, --force-tag, --force-branch
49
+ # --batch
4950
5051
# -o, --output
5152
# --dry-run
52
- # --force-branch RE
53
- # --force-tag RE
5453
# --symbol-transform RE:XX
5554
5655
# # ## ### ##### ######## #############
5756
## Public API, Methods
5857
@@ -77,10 +76,11 @@
7776
--state { state use [Value arguments] }
7877
--trunk-only { repository trunkonly! }
7978
--exclude { project::sym exclude [Value arguments] }
8079
--force-tag { project::sym forcetag [Value arguments] }
8180
--force-branch { project::sym forcebranch [Value arguments] }
81
+ --batch { log noprogress }
8282
default {
8383
Usage $badoption$option\n$gethelp
8484
}
8585
}
8686
}
@@ -105,10 +105,12 @@
105105
trouble info " -h, --help Print this message and exit with success"
106106
trouble info " --help-passes Print list of passes and exit with success"
107107
trouble info " --version Print version number of $argv0"
108108
trouble info " -v, --verbose Increase application's verbosity"
109109
trouble info " -q, --quiet Decrease application's verbosity"
110
+ trouble info " --batch Disable the progress feedback standard to"
111
+ trouble info " interactive use."
110112
trouble info ""
111113
trouble info " Conversion control options"
112114
trouble info ""
113115
trouble info " -p, --pass PASS Run only the specified conversion pass"
114116
trouble info " -p, --passes ?START?:?END? Run only the passes START through END,"
115117
--- tools/cvs2fossil/lib/c2f_option.tcl
+++ tools/cvs2fossil/lib/c2f_option.tcl
@@ -44,15 +44,14 @@
44 # -v, --verbose
45 # -q, --quiet
46 # --state (conversion status, ala config.cache)
47 # --trunk-only
48 # --exclude, --force-tag, --force-branch
 
49
50 # -o, --output
51 # --dry-run
52 # --force-branch RE
53 # --force-tag RE
54 # --symbol-transform RE:XX
55
56 # # ## ### ##### ######## #############
57 ## Public API, Methods
58
@@ -77,10 +76,11 @@
77 --state { state use [Value arguments] }
78 --trunk-only { repository trunkonly! }
79 --exclude { project::sym exclude [Value arguments] }
80 --force-tag { project::sym forcetag [Value arguments] }
81 --force-branch { project::sym forcebranch [Value arguments] }
 
82 default {
83 Usage $badoption$option\n$gethelp
84 }
85 }
86 }
@@ -105,10 +105,12 @@
105 trouble info " -h, --help Print this message and exit with success"
106 trouble info " --help-passes Print list of passes and exit with success"
107 trouble info " --version Print version number of $argv0"
108 trouble info " -v, --verbose Increase application's verbosity"
109 trouble info " -q, --quiet Decrease application's verbosity"
 
 
110 trouble info ""
111 trouble info " Conversion control options"
112 trouble info ""
113 trouble info " -p, --pass PASS Run only the specified conversion pass"
114 trouble info " -p, --passes ?START?:?END? Run only the passes START through END,"
115
--- tools/cvs2fossil/lib/c2f_option.tcl
+++ tools/cvs2fossil/lib/c2f_option.tcl
@@ -44,15 +44,14 @@
44 # -v, --verbose
45 # -q, --quiet
46 # --state (conversion status, ala config.cache)
47 # --trunk-only
48 # --exclude, --force-tag, --force-branch
49 # --batch
50
51 # -o, --output
52 # --dry-run
 
 
53 # --symbol-transform RE:XX
54
55 # # ## ### ##### ######## #############
56 ## Public API, Methods
57
@@ -77,10 +76,11 @@
76 --state { state use [Value arguments] }
77 --trunk-only { repository trunkonly! }
78 --exclude { project::sym exclude [Value arguments] }
79 --force-tag { project::sym forcetag [Value arguments] }
80 --force-branch { project::sym forcebranch [Value arguments] }
81 --batch { log noprogress }
82 default {
83 Usage $badoption$option\n$gethelp
84 }
85 }
86 }
@@ -105,10 +105,12 @@
105 trouble info " -h, --help Print this message and exit with success"
106 trouble info " --help-passes Print list of passes and exit with success"
107 trouble info " --version Print version number of $argv0"
108 trouble info " -v, --verbose Increase application's verbosity"
109 trouble info " -q, --quiet Decrease application's verbosity"
110 trouble info " --batch Disable the progress feedback standard to"
111 trouble info " interactive use."
112 trouble info ""
113 trouble info " Conversion control options"
114 trouble info ""
115 trouble info " -p, --pass PASS Run only the specified conversion pass"
116 trouble info " -p, --passes ?START?:?END? Run only the passes START through END,"
117
--- tools/cvs2fossil/lib/log.tcl
+++ tools/cvs2fossil/lib/log.tcl
@@ -40,10 +40,11 @@
4040
# to drive progress displays. It signals that for some long
4141
# running operation we are at tick 'n' of at most 'max' ticks. An
4242
# empty 'max' indicates an infinite progress display.
4343
4444
typemethod progress {verbosity system n max} {
45
+ if {!$myprogress} return
4546
if {$verbosity > $myloglevel} return
4647
uplevel #0 [linsert $mylogcmd end progress [System $system] $n $max]
4748
return
4849
}
4950
@@ -65,10 +66,15 @@
6566
6667
typemethod verbose {} {
6768
incr myloglevel
6869
return
6970
}
71
+
72
+ typemethod noprogress {} {
73
+ set myprogress 0
74
+ return
75
+ }
7076
7177
typemethod quiet {} {
7278
if {$myloglevel < 1} return
7379
incr myloglevel -1
7480
return
@@ -104,12 +110,13 @@
104110
# # ## ### ##### ######## #############
105111
## Internal, state
106112
107113
typevariable myloglevel 2 ; # Some verbosity, not too much
108114
typevariable mylogcmd ::vc::tools::log::OUT ; # Standard output to stdout.
109
- typevariable mysysfmt %s ; # Non-tabular formatting.
110
- typevariable mysyslen 0 ; # Ditto.
115
+ typevariable mysysfmt %s ; # Non-tabular formatting.
116
+ typevariable mysyslen 0 ; # Ditto.
117
+ typevariable myprogress 1 ; # Progress output is standard.
111118
112119
# # ## ### ##### ######## #############
113120
## Internal, helper methods (formatting, dispatch)
114121
115122
proc System {s} {
116123
--- tools/cvs2fossil/lib/log.tcl
+++ tools/cvs2fossil/lib/log.tcl
@@ -40,10 +40,11 @@
40 # to drive progress displays. It signals that for some long
41 # running operation we are at tick 'n' of at most 'max' ticks. An
42 # empty 'max' indicates an infinite progress display.
43
44 typemethod progress {verbosity system n max} {
 
45 if {$verbosity > $myloglevel} return
46 uplevel #0 [linsert $mylogcmd end progress [System $system] $n $max]
47 return
48 }
49
@@ -65,10 +66,15 @@
65
66 typemethod verbose {} {
67 incr myloglevel
68 return
69 }
 
 
 
 
 
70
71 typemethod quiet {} {
72 if {$myloglevel < 1} return
73 incr myloglevel -1
74 return
@@ -104,12 +110,13 @@
104 # # ## ### ##### ######## #############
105 ## Internal, state
106
107 typevariable myloglevel 2 ; # Some verbosity, not too much
108 typevariable mylogcmd ::vc::tools::log::OUT ; # Standard output to stdout.
109 typevariable mysysfmt %s ; # Non-tabular formatting.
110 typevariable mysyslen 0 ; # Ditto.
 
111
112 # # ## ### ##### ######## #############
113 ## Internal, helper methods (formatting, dispatch)
114
115 proc System {s} {
116
--- tools/cvs2fossil/lib/log.tcl
+++ tools/cvs2fossil/lib/log.tcl
@@ -40,10 +40,11 @@
40 # to drive progress displays. It signals that for some long
41 # running operation we are at tick 'n' of at most 'max' ticks. An
42 # empty 'max' indicates an infinite progress display.
43
44 typemethod progress {verbosity system n max} {
45 if {!$myprogress} return
46 if {$verbosity > $myloglevel} return
47 uplevel #0 [linsert $mylogcmd end progress [System $system] $n $max]
48 return
49 }
50
@@ -65,10 +66,15 @@
66
67 typemethod verbose {} {
68 incr myloglevel
69 return
70 }
71
72 typemethod noprogress {} {
73 set myprogress 0
74 return
75 }
76
77 typemethod quiet {} {
78 if {$myloglevel < 1} return
79 incr myloglevel -1
80 return
@@ -104,12 +110,13 @@
110 # # ## ### ##### ######## #############
111 ## Internal, state
112
113 typevariable myloglevel 2 ; # Some verbosity, not too much
114 typevariable mylogcmd ::vc::tools::log::OUT ; # Standard output to stdout.
115 typevariable mysysfmt %s ; # Non-tabular formatting.
116 typevariable mysyslen 0 ; # Ditto.
117 typevariable myprogress 1 ; # Progress output is standard.
118
119 # # ## ### ##### ######## #############
120 ## Internal, helper methods (formatting, dispatch)
121
122 proc System {s} {
123

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button