Fossil

Check-in [9f3fd3ec4b]
Login

Check-in [9f3fd3ec4b]

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

Overview
Comment:Added a bit of path normalization, stripping of a trailing slash from the path to the cvs repository. Before such a slash could break a later coming fileutil::stripPath.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9f3fd3ec4b65c657d5c42422d2a110df9f6c0c11
User & Date: aku 2007-10-23 04:34:12.000
Context
2007-10-23
04:36
Restructured the code handling NTBD in ExcludeBranch a bit to prevent the asserts in GraftNTDB2Trunk to bail out. ... (check-in: e94b52b6f2 user: aku tags: trunk)
04:34
Added a bit of path normalization, stripping of a trailing slash from the path to the cvs repository. Before such a slash could break a later coming fileutil::stripPath. ... (check-in: 9f3fd3ec4b user: aku tags: trunk)
04:32
Added more checks to the RCS parser to detect bogus symbol names and problematic log messages. Added ability to rewind back to the beginning of the last recognized token for a nicer positioned error message. ... (check-in: 1527954d87 user: aku tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tools/cvs2fossil/lib/c2f_option.tcl.
18
19
20
21
22
23
24

25
26
27
28
29
30
31
# # ## ### ##### ######## ############# #####################
## 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
package require vc::fossil::import::cvs::state        ; # State storage

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







>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# # ## ### ##### ######## ############# #####################
## 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::tools::misc                       ; # Misc. path reformatting.
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
package require vc::fossil::import::cvs::state        ; # State storage

# # ## ### ##### ######## ############# #####################
## 
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
		    Usage $badoption$option\n$gethelp
		}
	    }
	}

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

	Validate
	return
    }

    # # ## ### ##### ######## #############
    ## Internal methods, printing information.







|







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
		    Usage $badoption$option\n$gethelp
		}
	    }
	}

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

	Validate
	return
    }

    # # ## ### ##### ######## #############
    ## Internal methods, printing information.
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
}

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
	namespace import ::vc::fossil::import::cvs::state
    }
}

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

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







>












188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
}

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::tools::misc::striptrailingslash
	namespace import ::vc::fossil::import::cvs::pass
	namespace import ::vc::fossil::import::cvs::pass::collar
	namespace import ::vc::fossil::import::cvs::repository
	namespace import ::vc::fossil::import::cvs::state
    }
}

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

package provide vc::fossil::import::cvs::option 1.0
return
Changes to tools/cvs2fossil/lib/misc.tcl.
55
56
57
58
59
60
61





62
63
64
65
66
67
68
69
70
71
72
73
74
	set pos [lsearch -exact $list $item]
	if {$pos < 0} return
	set list [lreplace $list $pos $pos]
	return
    }

    # Delete item from list by name






    # # ## ### ##### ######## #############
}

namespace eval ::vc::tools::misc {
    namespace export sp nsp max ldelete
}

# -----------------------------------------------------------------------------
# Ready

package provide vc::tools::misc 1.0
return







>
>
>
>
>





|







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
	set pos [lsearch -exact $list $item]
	if {$pos < 0} return
	set list [lreplace $list $pos $pos]
	return
    }

    # Delete item from list by name

    proc striptrailingslash {path} {
	# split and rejoin gets rid of a traling / character.
	return [eval [linsert [file split $path] 0 file join]]
    }

    # # ## ### ##### ######## #############
}

namespace eval ::vc::tools::misc {
    namespace export sp nsp max ldelete striptrailingslash
}

# -----------------------------------------------------------------------------
# Ready

package provide vc::tools::misc 1.0
return