Differences From:
File
tools/cvs2fossil/lib/c2f_pass.tcl
part of check-in
[eb656de7d9]
- Added the basic parts of the state manager and integrated it with option processor and pass manager.
by
aku on
2007-10-05 05:33:14.
[view]
To:
File
tools/cvs2fossil/lib/c2f_pass.tcl
part of check-in
[43d72c6246]
- Better formatting for --help-passes, align codes.
by
aku on
2007-10-06 03:53:41.
[view]
@@ -19,8 +19,9 @@
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require vc::fossil::import::cvs::state ; # State storage
+package require vc::tools::misc ; # Text formatting
package require vc::tools::trouble ; # Error reporting.
package require vc::tools::log ; # User feedback.
package require struct::list ; # Portable lassign
@@ -45,10 +46,15 @@
trouble info ""
trouble info "Conversion passes:"
trouble info ""
set n 0
+
+ set clen [max [struct::list map $mypasses {string length}]]
+ set cfmt %-${clen}s
+ set nfmt %[string length [llength $mypasses]]s
+
foreach code $mypasses {
- trouble info " [format %2d $n]: $code $mydesc($code)"
+ trouble info " [format $nfmt $n]: [format $cfmt $code] : $mydesc($code)"
incr n
}
trouble info ""
return
@@ -168,8 +174,9 @@
namespace eval ::vc::fossil::import::cvs {
namespace export pass
namespace eval pass {
namespace import ::vc::fossil::import::cvs::state
+ namespace import ::vc::tools::misc::*
namespace import ::vc::tools::trouble
namespace import ::vc::tools::log
log register pass
}