Differences From:
File
tools/cvs2fossil/lib/c2f_pass.tcl
part of check-in
[b679ca3356]
- Code cleanup. Removed trailing whitespace across the board.
by
aku on
2007-11-25 07:54:09.
[view]
To:
File
tools/cvs2fossil/lib/c2f_pass.tcl
part of check-in
[47d52d1efd]
- Added convenience method for assertions and used it in place of the existing if/trouble internal constructions. Changed API of 'log write' so that we can defer substituation of the message to when the write actually happen, and converted all places which would be hit by double-substitution. The remaining 'log write' calls will be converted incrementally.
by
aku on
2007-11-28 05:39:49.
[view]
@@ -16,15 +16,16 @@
# # ## ### ##### ######## ############# #####################
## Requirements
-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
+package require Tcl 8.4 ; # Required runtime.
+package require snit ; # OO system.
+package require vc::fossil::import::cvs::state ; # State storage
+package require vc::fossil::import::cvs::integrity ; # State integrity checks.
+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
# # ## ### ##### ######## ############# #####################
##
@@ -32,11 +33,11 @@
# # ## ### ##### ######## #############
## Public API, Methods (Setup, query)
typemethod define {name description command} {
- if {[info exists mydesc($name)]} {
- trouble internal "Multiple definitions for pass code '$name'"
- }
+ integrity assert {
+ ![info exists mydesc($name)]
+ } {Multiple definitions for pass code '$name'}
lappend mypasses $name
set mydesc($name) $description
set mycmd($name) $command
return
@@ -198,8 +199,9 @@
namespace eval ::vc::fossil::import::cvs {
namespace export pass
namespace eval pass {
namespace import ::vc::fossil::import::cvs::state
+ namespace import ::vc::fossil::import::cvs::integrity
namespace import ::vc::tools::misc::*
namespace import ::vc::tools::trouble
namespace import ::vc::tools::log
log register pass