Fossil SCM
In roundtrip.test, remove Windows-specific glob directory results: _FOSSIL_ , and, anything starting with "." (which Unix glob will not return.)
Commit
70482dea953828ae6ed386ddcdef1839603b147f3d012d68aac285219a4e6d09
Parent
1a4971545c40bc8…
1 file changed
+5
-1
+5
-1
| --- test/roundtrip.test | ||
| +++ test/roundtrip.test | ||
| @@ -128,17 +128,21 @@ | ||
| 128 | 128 | } |
| 129 | 129 | return $files |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | # Returns a dictionary from the name of each file in the current |
| 133 | -# directory and below, except those in SKIP, to its content. | |
| 133 | +# directory and below to its content. Leaves out the files in SKIP, | |
| 134 | +# files whose names start with ".", and the Windows-specific checkout | |
| 135 | +# database name _FOSSIL_. Tricky note: on Windows "glob *" will match names | |
| 136 | +# starting with ".", but not on Unix/Mac. | |
| 134 | 137 | # |
| 135 | 138 | proc roundtrip_dir_files {{dir .} {skip {}}} { |
| 136 | 139 | set files [dict create] |
| 137 | 140 | foreach f [lsort [glob -nocomplain -directory $dir -tails *]] { |
| 138 | 141 | set p [expr {$dir eq "." ? $f : "$dir/$f"}] |
| 139 | 142 | if {$p in $skip} continue |
| 143 | + if {[string index $f 0] eq "." || $f eq "_FOSSIL_"} continue | |
| 140 | 144 | if {[file isdirectory $p]} { |
| 141 | 145 | set files [dict merge $files [roundtrip_dir_files $p $skip]] |
| 142 | 146 | } else { |
| 143 | 147 | dict set files $p [read_file $p] |
| 144 | 148 | } |
| 145 | 149 |
| --- test/roundtrip.test | |
| +++ test/roundtrip.test | |
| @@ -128,17 +128,21 @@ | |
| 128 | } |
| 129 | return $files |
| 130 | } |
| 131 | |
| 132 | # Returns a dictionary from the name of each file in the current |
| 133 | # directory and below, except those in SKIP, to its content. |
| 134 | # |
| 135 | proc roundtrip_dir_files {{dir .} {skip {}}} { |
| 136 | set files [dict create] |
| 137 | foreach f [lsort [glob -nocomplain -directory $dir -tails *]] { |
| 138 | set p [expr {$dir eq "." ? $f : "$dir/$f"}] |
| 139 | if {$p in $skip} continue |
| 140 | if {[file isdirectory $p]} { |
| 141 | set files [dict merge $files [roundtrip_dir_files $p $skip]] |
| 142 | } else { |
| 143 | dict set files $p [read_file $p] |
| 144 | } |
| 145 |
| --- test/roundtrip.test | |
| +++ test/roundtrip.test | |
| @@ -128,17 +128,21 @@ | |
| 128 | } |
| 129 | return $files |
| 130 | } |
| 131 | |
| 132 | # Returns a dictionary from the name of each file in the current |
| 133 | # directory and below to its content. Leaves out the files in SKIP, |
| 134 | # files whose names start with ".", and the Windows-specific checkout |
| 135 | # database name _FOSSIL_. Tricky note: on Windows "glob *" will match names |
| 136 | # starting with ".", but not on Unix/Mac. |
| 137 | # |
| 138 | proc roundtrip_dir_files {{dir .} {skip {}}} { |
| 139 | set files [dict create] |
| 140 | foreach f [lsort [glob -nocomplain -directory $dir -tails *]] { |
| 141 | set p [expr {$dir eq "." ? $f : "$dir/$f"}] |
| 142 | if {$p in $skip} continue |
| 143 | if {[string index $f 0] eq "." || $f eq "_FOSSIL_"} continue |
| 144 | if {[file isdirectory $p]} { |
| 145 | set files [dict merge $files [roundtrip_dir_files $p $skip]] |
| 146 | } else { |
| 147 | dict set files $p [read_file $p] |
| 148 | } |
| 149 |