Fossil SCM
cvs2fossil: add -nocomplain flag to glob to prevent an error if no files/dirs match
Commit
6625739eda3e533c36d498bbc8b86a693795e367
Parent
7208c7ac4d15626…
1 file changed
+3
-3
| --- tools/cvs2fossil/lib/c2f_pcollar.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_pcollar.tcl | ||
| @@ -114,12 +114,12 @@ | ||
| 114 | 114 | set usr [UserPath $rcs isattic] |
| 115 | 115 | if {[IsSuperceded $base $rcs $usr $isattic]} continue |
| 116 | 116 | |
| 117 | 117 | # XXX Checkme: not sure if this will still fail in the case where a directory does conflict with a file XXX |
| 118 | 118 | 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 | |
| 121 | 121 | } { |
| 122 | 122 | trouble fatal "Directory name conflicts with filename." |
| 123 | 123 | trouble fatal "Please remove or rename one of the following:" |
| 124 | 124 | trouble fatal " $base/$usr" |
| 125 | 125 | trouble fatal " $base/$rcs" |
| @@ -221,11 +221,11 @@ | ||
| 221 | 221 | ::variable myignore |
| 222 | 222 | |
| 223 | 223 | if {!$isattic} {return 0} |
| 224 | 224 | |
| 225 | 225 | # 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} | |
| 227 | 227 | |
| 228 | 228 | # We have a regular archive and an Attic archive refering to |
| 229 | 229 | # the same user visible file. Ignore the file in the Attic. |
| 230 | 230 | # |
| 231 | 231 | # By default this is a problem causing an abort after the pass |
| 232 | 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 -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 |