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.
Commit
dc72fd9624dcd15b0782fa7687fb8778920307bf
Parent
9ea1f140436a190…
1 file changed
+2
-1
+2
-1
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -197,13 +197,14 @@ | ||
| 197 | 197 | if {$::env(HOME) ne [pwd]} { |
| 198 | 198 | catch {exec $::fossilexe info} res |
| 199 | 199 | if {![regexp {use --repository} $res]} { |
| 200 | 200 | error "In an open checkout: cannot initialize a new repository here." |
| 201 | 201 | } |
| 202 | - # Fossil will write data on $HOME, running 'fossil new' here. | |
| 202 | + # Fossil will write data on $FOSSIL_HOME, running 'fossil new' here. | |
| 203 | 203 | # We need not to clutter the $HOME of the test caller. |
| 204 | 204 | # |
| 205 | + set ::env(FOSSIL_HOME) [pwd] | |
| 205 | 206 | set ::env(HOME) [pwd] |
| 206 | 207 | } |
| 207 | 208 | catch {exec $::fossilexe close -f} |
| 208 | 209 | file delete $filename |
| 209 | 210 | exec $::fossilexe new $filename |
| 210 | 211 |
| --- 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 |