Fossil SCM

Fix glitch in tester.tcl on Windows which caused repo_init to fail to guard the users's lists of all repositories and checkouts. Setting FOSSIL_HOME as well as HOME to [pwd] resolves this neatly, and likely makes it more robust on other platforms since FOSSIL_HOME is always checked first and if set by a user, would still override the attempt made by repo_init to protect them.

rberteig 2016-02-27 02:12 trunk
Commit dc72fd9624dcd15b0782fa7687fb8778920307bf
1 file changed +2 -1
+2 -1
--- test/tester.tcl
+++ test/tester.tcl
@@ -197,13 +197,14 @@
197197
if {$::env(HOME) ne [pwd]} {
198198
catch {exec $::fossilexe info} res
199199
if {![regexp {use --repository} $res]} {
200200
error "In an open checkout: cannot initialize a new repository here."
201201
}
202
- # Fossil will write data on $HOME, running 'fossil new' here.
202
+ # Fossil will write data on $FOSSIL_HOME, running 'fossil new' here.
203203
# We need not to clutter the $HOME of the test caller.
204204
#
205
+ set ::env(FOSSIL_HOME) [pwd]
205206
set ::env(HOME) [pwd]
206207
}
207208
catch {exec $::fossilexe close -f}
208209
file delete $filename
209210
exec $::fossilexe new $filename
210211
--- test/tester.tcl
+++ test/tester.tcl
@@ -197,13 +197,14 @@
197 if {$::env(HOME) ne [pwd]} {
198 catch {exec $::fossilexe info} res
199 if {![regexp {use --repository} $res]} {
200 error "In an open checkout: cannot initialize a new repository here."
201 }
202 # Fossil will write data on $HOME, running 'fossil new' here.
203 # We need not to clutter the $HOME of the test caller.
204 #
 
205 set ::env(HOME) [pwd]
206 }
207 catch {exec $::fossilexe close -f}
208 file delete $filename
209 exec $::fossilexe new $filename
210
--- test/tester.tcl
+++ test/tester.tcl
@@ -197,13 +197,14 @@
197 if {$::env(HOME) ne [pwd]} {
198 catch {exec $::fossilexe info} res
199 if {![regexp {use --repository} $res]} {
200 error "In an open checkout: cannot initialize a new repository here."
201 }
202 # Fossil will write data on $FOSSIL_HOME, running 'fossil new' here.
203 # We need not to clutter the $HOME of the test caller.
204 #
205 set ::env(FOSSIL_HOME) [pwd]
206 set ::env(HOME) [pwd]
207 }
208 catch {exec $::fossilexe close -f}
209 file delete $filename
210 exec $::fossilexe new $filename
211

Keyboard Shortcuts

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