cmdr
Check-in [a94ac7b701]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Got fix for history
Timelines: family | ancestors | descendants | both | more-vtypes
Files: files | file ages | folders
SHA1: a94ac7b70190388e7fc24914a7eb7192a6425777
User & Date: aku 2015-03-10 03:01:41
Context
2015-03-28
02:21
Fix year validation bug with misbehaving "clock scan" (more likely me misunderstanding it before) check-in: 75e8dc5ee8 user: aku tags: more-vtypes
2015-03-10
03:01
Got fix for history check-in: a94ac7b701 user: aku tags: more-vtypes
2015-03-06
20:44
Fix bug in history mgmt for a save-file in a directory. Ensure that the directory exists before writing/creating the file itself. check-in: 06c0827602 user: andreask tags: trunk
19:14
And more vtypes: positive ints, years, and weekdays check-in: 307a15e657 user: aku tags: more-vtypes
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to history.tcl.

   243    243       debug.cmdr/history {}
   244    244       variable file
   245    245       variable cache
   246    246   
   247    247       debug.cmdr/history {file      = $file}
   248    248       debug.cmdr/history {cache len = [llength $cache]}
   249    249   
          250  +    file mkdir [file dirname $file]
   250    251       fileutil::appendToFile $file [lindex $cache end]\n
   251    252       return
   252    253   }
   253    254   
   254    255   proc ::cmdr::history::SaveAll {} {
   255    256       debug.cmdr/history {}
   256    257   
................................................................................
   269    270   	append contents "#limit=$limit\n"
   270    271       }
   271    272   
   272    273       if {[llength $cache]} {
   273    274   	append contents "[join $cache \n]\n"
   274    275       }
   275    276   
          277  +    file mkdir [file dirname $file]
   276    278       fileutil::writeFile $file $contents
   277    279       return
   278    280   }
   279    281   
   280    282   proc ::cmdr::history::Load {} {
   281    283       CheckActive
   282    284   
................................................................................
   413    415       } else {
   414    416   	return "Keep $limit entries"
   415    417       }
   416    418   }
   417    419   
   418    420   # # ## ### ##### ######## ############# #####################
   419    421   ## Ready
   420         -package provide cmdr::history 0
          422  +package provide cmdr::history 0.1
   421    423   return