Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Attempt to make sure that multiple calls to 'repo_init' get properly cleaned up. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | testerCleanup |
Files: | files | file ages | folders |
SHA1: |
c464935bcd5717ad49e2fbb19f72ae60 |
User & Date: | mistachkin 2016-03-02 07:00:54.773 |
Context
2016-03-02
| ||
07:13 | Refactoring, fixes to the previous check-in, etc. ... (check-in: cda4cc8b user: mistachkin tags: testerCleanup) | |
07:00 | Attempt to make sure that multiple calls to 'repo_init' get properly cleaned up. ... (check-in: c464935b user: mistachkin tags: testerCleanup) | |
06:58 | Robustify the cleanup process. ... (check-in: ee5214b7 user: mistachkin tags: testerCleanup) | |
Changes
Changes to test/tester.tcl.
︙ | ︙ | |||
225 226 227 228 229 230 231 | if {[info exists ::tempSavedPwd]} { cd $::tempSavedPwd; unset ::tempSavedPwd } # First, attempt to forcibly delete the specific temporary repository # directory. catch {file delete -force $::tempRepoPath} # Next, attempt to gracefully delete the temporary repository directories. | > | > | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | if {[info exists ::tempSavedPwd]} { cd $::tempSavedPwd; unset ::tempSavedPwd } # First, attempt to forcibly delete the specific temporary repository # directory. catch {file delete -force $::tempRepoPath} # Next, attempt to gracefully delete the temporary repository directories. foreach repoSeed $::tempRepoSeeds { catch {file delete [file join $::tempPath repo_[pid] $repoSeed]} } catch {file delete [file join $::tempPath repo_[pid]]} # Finally, attempt to gracefully delete the temporary home. if {$::tcl_platform(platform) eq "windows"} { catch {file delete [file join $::tempHomePath _fossil]} } else { catch {file delete [file join $::tempHomePath .fossil]} } |
︙ | ︙ | |||
255 256 257 258 259 260 261 | } # # Create and open a new Fossil repository and clean the checkout # proc repo_init {{filename ".rep.fossil"}} { set_home_to_elsewhere | | > | | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | } # # Create and open a new Fossil repository and clean the checkout # proc repo_init {{filename ".rep.fossil"}} { set_home_to_elsewhere set repoSeed [string trim [clock seconds] -] lappend ::tempRepoSeeds $repoSeed set ::tempRepoPath [file join \ $::tempPath repo_[pid] $repoSeed [file tail [get_script_or_fail]]] if {[catch { file mkdir $::tempRepoPath } error] != 0} { error "could not make directory \"$::tempRepoPath\",\ please set TEMP variable in environment: $error" } set ::tempSavedPwd [pwd]; cd $::tempRepoPath |
︙ | ︙ |