Fossil SCM

Sort the dictionary made from a directory file listing, because "glob" lists files in different orders depending on OS and filesystem. Found by testing on a FreeBSD UFS directory; may fix Windows as well.

danshearer 2026-11-20 13:46 UTC test-suite-new
Commit 1a4971545c40bc8e03f070524444525c4c42a01433ef4648b5817d707875a083
1 file changed +1 -1
--- test/roundtrip.test
+++ test/roundtrip.test
@@ -132,11 +132,11 @@
132132
# Returns a dictionary from the name of each file in the current
133133
# directory and below, except those in SKIP, to its content.
134134
#
135135
proc roundtrip_dir_files {{dir .} {skip {}}} {
136136
set files [dict create]
137
- foreach f [glob -nocomplain -directory $dir -tails *] {
137
+ foreach f [lsort [glob -nocomplain -directory $dir -tails *]] {
138138
set p [expr {$dir eq "." ? $f : "$dir/$f"}]
139139
if {$p in $skip} continue
140140
if {[file isdirectory $p]} {
141141
set files [dict merge $files [roundtrip_dir_files $p $skip]]
142142
} else {
143143
--- test/roundtrip.test
+++ test/roundtrip.test
@@ -132,11 +132,11 @@
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 [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
--- test/roundtrip.test
+++ test/roundtrip.test
@@ -132,11 +132,11 @@
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

Keyboard Shortcuts

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