Fossil SCM

Fixed the names for the case-sensitive file operations.

aku 2008-01-30 03:10 trunk
Commit ed13b28b13e139d0438d5ff54ddc4029373ecafb
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -115,12 +115,12 @@
115115
set usr [UserPath $rcs isattic]
116116
if {[IsSuperceded $base $rcs $usr $isattic]} continue
117117
118118
# XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
119119
if {
120
- [fileexists_ci $base/$usr] &&
121
- [fileisdir_ci $base/$usr]
120
+ [fileexists_cs $base/$usr] &&
121
+ [fileisdir_cs $base/$usr]
122122
} {
123123
trouble fatal "Directory name conflicts with filename."
124124
trouble fatal "Please remove or rename one of the following:"
125125
trouble fatal " $base/$usr"
126126
trouble fatal " $base/$rcs"
@@ -220,11 +220,11 @@
220220
221221
proc IsSuperceded {base rcs usr isattic} {
222222
::variable myignore
223223
224224
if {!$isattic} {return 0}
225
- if {![fileexists_ci $base/$usr,v]} {return 0}
225
+ if {![fileexists_cs $base/$usr,v]} {return 0}
226226
227227
# We have a regular archive and an Attic archive refering to
228228
# the same user visible file. Ignore the file in the Attic.
229229
#
230230
# By default this is a problem causing an abort after the pass
231231
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -115,12 +115,12 @@
115 set usr [UserPath $rcs isattic]
116 if {[IsSuperceded $base $rcs $usr $isattic]} continue
117
118 # XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
119 if {
120 [fileexists_ci $base/$usr] &&
121 [fileisdir_ci $base/$usr]
122 } {
123 trouble fatal "Directory name conflicts with filename."
124 trouble fatal "Please remove or rename one of the following:"
125 trouble fatal " $base/$usr"
126 trouble fatal " $base/$rcs"
@@ -220,11 +220,11 @@
220
221 proc IsSuperceded {base rcs usr isattic} {
222 ::variable myignore
223
224 if {!$isattic} {return 0}
225 if {![fileexists_ci $base/$usr,v]} {return 0}
226
227 # We have a regular archive and an Attic archive refering to
228 # the same user visible file. Ignore the file in the Attic.
229 #
230 # By default this is a problem causing an abort after the pass
231
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -115,12 +115,12 @@
115 set usr [UserPath $rcs isattic]
116 if {[IsSuperceded $base $rcs $usr $isattic]} continue
117
118 # XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
119 if {
120 [fileexists_cs $base/$usr] &&
121 [fileisdir_cs $base/$usr]
122 } {
123 trouble fatal "Directory name conflicts with filename."
124 trouble fatal "Please remove or rename one of the following:"
125 trouble fatal " $base/$usr"
126 trouble fatal " $base/$rcs"
@@ -220,11 +220,11 @@
220
221 proc IsSuperceded {base rcs usr isattic} {
222 ::variable myignore
223
224 if {!$isattic} {return 0}
225 if {![fileexists_cs $base/$usr,v]} {return 0}
226
227 # We have a regular archive and an Attic archive refering to
228 # the same user visible file. Ignore the file in the Attic.
229 #
230 # By default this is a problem causing an abort after the pass
231
--- tools/cvs2fossil/lib/misc.tcl
+++ tools/cvs2fossil/lib/misc.tcl
@@ -98,45 +98,45 @@
9898
# We use glob to get the list of files (with proper case in
9999
# the names) to perform our own, case-sensitive matching. WE
100100
# use 8.5 features where possible, for clarity.
101101
102102
if {[package vsatisfies [package present Tcl] 8.5]} {
103
- proc fileexists_ci {path} {
103
+ proc fileexists_cs {path} {
104104
set dir [::file dirname $path]
105105
set file [::file tail $path]
106106
return [expr {$file in [glob -nocomplain -tail -directory $dir *]}]
107107
}
108108
109
- proc fileisdir_ci {path} {
109
+ proc fileisdir_cs {path} {
110110
set dir [::file dirname $path]
111111
set file [::file tail $path]
112112
return [expr {$file in [glob -nocomplain -types d -tail -directory $dir *]}]
113113
}
114114
} else {
115
- proc fileexists_ci {path} {
115
+ proc fileexists_cs {path} {
116116
set dir [::file dirname $path]
117117
set file [::file tail $path]
118118
return [expr {[lsearch [glob -nocomplain -tail -directory $dir *] $file] >= 0}]
119119
}
120120
121
- proc fileisdir_ci {path} {
121
+ proc fileisdir_cs {path} {
122122
set dir [::file dirname $path]
123123
set file [::file tail $path]
124124
return [expr {[lsearch [glob -nocomplain -types d -tail -directory $dir *] $file] >= 0}]
125125
}
126126
}
127127
} else {
128
- proc fileexists_ci {path} { return [file exists $path] }
129
- proc fileisdir_ci {path} { return [file isdirectory $path] }
128
+ proc fileexists_cs {path} { return [file exists $path] }
129
+ proc fileisdir_cs {path} { return [file isdirectory $path] }
130130
}
131131
132132
# # ## ### ##### ######## #############
133133
}
134134
135135
namespace eval ::vc::tools::misc {
136136
namespace export sp nsp max min max2 min2 ldelete
137
- namespace export striptrailingslash fileexists_ci fileisdir_ci
137
+ namespace export striptrailingslash fileexists_cs fileisdir_cs
138138
}
139139
140140
# -----------------------------------------------------------------------------
141141
# Ready
142142
143143
--- tools/cvs2fossil/lib/misc.tcl
+++ tools/cvs2fossil/lib/misc.tcl
@@ -98,45 +98,45 @@
98 # We use glob to get the list of files (with proper case in
99 # the names) to perform our own, case-sensitive matching. WE
100 # use 8.5 features where possible, for clarity.
101
102 if {[package vsatisfies [package present Tcl] 8.5]} {
103 proc fileexists_ci {path} {
104 set dir [::file dirname $path]
105 set file [::file tail $path]
106 return [expr {$file in [glob -nocomplain -tail -directory $dir *]}]
107 }
108
109 proc fileisdir_ci {path} {
110 set dir [::file dirname $path]
111 set file [::file tail $path]
112 return [expr {$file in [glob -nocomplain -types d -tail -directory $dir *]}]
113 }
114 } else {
115 proc fileexists_ci {path} {
116 set dir [::file dirname $path]
117 set file [::file tail $path]
118 return [expr {[lsearch [glob -nocomplain -tail -directory $dir *] $file] >= 0}]
119 }
120
121 proc fileisdir_ci {path} {
122 set dir [::file dirname $path]
123 set file [::file tail $path]
124 return [expr {[lsearch [glob -nocomplain -types d -tail -directory $dir *] $file] >= 0}]
125 }
126 }
127 } else {
128 proc fileexists_ci {path} { return [file exists $path] }
129 proc fileisdir_ci {path} { return [file isdirectory $path] }
130 }
131
132 # # ## ### ##### ######## #############
133 }
134
135 namespace eval ::vc::tools::misc {
136 namespace export sp nsp max min max2 min2 ldelete
137 namespace export striptrailingslash fileexists_ci fileisdir_ci
138 }
139
140 # -----------------------------------------------------------------------------
141 # Ready
142
143
--- tools/cvs2fossil/lib/misc.tcl
+++ tools/cvs2fossil/lib/misc.tcl
@@ -98,45 +98,45 @@
98 # We use glob to get the list of files (with proper case in
99 # the names) to perform our own, case-sensitive matching. WE
100 # use 8.5 features where possible, for clarity.
101
102 if {[package vsatisfies [package present Tcl] 8.5]} {
103 proc fileexists_cs {path} {
104 set dir [::file dirname $path]
105 set file [::file tail $path]
106 return [expr {$file in [glob -nocomplain -tail -directory $dir *]}]
107 }
108
109 proc fileisdir_cs {path} {
110 set dir [::file dirname $path]
111 set file [::file tail $path]
112 return [expr {$file in [glob -nocomplain -types d -tail -directory $dir *]}]
113 }
114 } else {
115 proc fileexists_cs {path} {
116 set dir [::file dirname $path]
117 set file [::file tail $path]
118 return [expr {[lsearch [glob -nocomplain -tail -directory $dir *] $file] >= 0}]
119 }
120
121 proc fileisdir_cs {path} {
122 set dir [::file dirname $path]
123 set file [::file tail $path]
124 return [expr {[lsearch [glob -nocomplain -types d -tail -directory $dir *] $file] >= 0}]
125 }
126 }
127 } else {
128 proc fileexists_cs {path} { return [file exists $path] }
129 proc fileisdir_cs {path} { return [file isdirectory $path] }
130 }
131
132 # # ## ### ##### ######## #############
133 }
134
135 namespace eval ::vc::tools::misc {
136 namespace export sp nsp max min max2 min2 ldelete
137 namespace export striptrailingslash fileexists_cs fileisdir_cs
138 }
139
140 # -----------------------------------------------------------------------------
141 # Ready
142
143

Keyboard Shortcuts

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