Fossil SCM

cvs2fossil: add -nocomplain flag to glob to prevent an error if no files/dirs match

mjanssen 2008-01-29 00:12 trunk
Commit 6625739eda3e533c36d498bbc8b86a693795e367
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -114,12 +114,12 @@
114114
set usr [UserPath $rcs isattic]
115115
if {[IsSuperceded $base $rcs $usr $isattic]} continue
116116
117117
# XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
118118
if {
119
- [lsearch [glob -tail -types f -directory $base *] $usr] != -1 &&
120
- [lsearch [glob -tail -types d -directory $base *] $usr] != -1
119
+ [lsearch [glob -nocomplain -tail -types f -directory $base *] $usr] != -1 &&
120
+ [lsearch [glob -nocomplain -tail -types d -directory $base *] $usr] != -1
121121
} {
122122
trouble fatal "Directory name conflicts with filename."
123123
trouble fatal "Please remove or rename one of the following:"
124124
trouble fatal " $base/$usr"
125125
trouble fatal " $base/$rcs"
@@ -221,11 +221,11 @@
221221
::variable myignore
222222
223223
if {!$isattic} {return 0}
224224
225225
# use glob to account for case insensitive file systems
226
- if {[lsearch [glob -tail -directory $base *] $usr,v] == -1} {return 0}
226
+ if {[lsearch [glob -nocomplain -tail -directory $base *] $usr,v] == -1} {return 0}
227227
228228
# We have a regular archive and an Attic archive refering to
229229
# the same user visible file. Ignore the file in the Attic.
230230
#
231231
# By default this is a problem causing an abort after the pass
232232
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -114,12 +114,12 @@
114 set usr [UserPath $rcs isattic]
115 if {[IsSuperceded $base $rcs $usr $isattic]} continue
116
117 # XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
118 if {
119 [lsearch [glob -tail -types f -directory $base *] $usr] != -1 &&
120 [lsearch [glob -tail -types d -directory $base *] $usr] != -1
121 } {
122 trouble fatal "Directory name conflicts with filename."
123 trouble fatal "Please remove or rename one of the following:"
124 trouble fatal " $base/$usr"
125 trouble fatal " $base/$rcs"
@@ -221,11 +221,11 @@
221 ::variable myignore
222
223 if {!$isattic} {return 0}
224
225 # use glob to account for case insensitive file systems
226 if {[lsearch [glob -tail -directory $base *] $usr,v] == -1} {return 0}
227
228 # We have a regular archive and an Attic archive refering to
229 # the same user visible file. Ignore the file in the Attic.
230 #
231 # By default this is a problem causing an abort after the pass
232
--- tools/cvs2fossil/lib/c2f_pcollar.tcl
+++ tools/cvs2fossil/lib/c2f_pcollar.tcl
@@ -114,12 +114,12 @@
114 set usr [UserPath $rcs isattic]
115 if {[IsSuperceded $base $rcs $usr $isattic]} continue
116
117 # XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX
118 if {
119 [lsearch [glob -nocomplain -tail -types f -directory $base *] $usr] != -1 &&
120 [lsearch [glob -nocomplain -tail -types d -directory $base *] $usr] != -1
121 } {
122 trouble fatal "Directory name conflicts with filename."
123 trouble fatal "Please remove or rename one of the following:"
124 trouble fatal " $base/$usr"
125 trouble fatal " $base/$rcs"
@@ -221,11 +221,11 @@
221 ::variable myignore
222
223 if {!$isattic} {return 0}
224
225 # use glob to account for case insensitive file systems
226 if {[lsearch [glob -nocomplain -tail -directory $base *] $usr,v] == -1} {return 0}
227
228 # We have a regular archive and an Attic archive refering to
229 # the same user visible file. Ignore the file in the Attic.
230 #
231 # By default this is a problem causing an abort after the pass
232

Keyboard Shortcuts

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