Overview
SHA1 Hash: | 4e49cbf03bb46ac5c67133bf116654b9890e8d41 |
---|---|
Date: | 2007-10-17 03:08:06 |
User: | aku |
Comment: | New helper command to delete item from list by name instead of position. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/cvs2fossil/lib/misc.tcl from [d5db2a2c74] to [090ed4e354].
@@ -48,17 +48,27 @@ set max $e } return $max } + proc ldelete {lv item} { + upvar 1 $lv list + set pos [lsearch -exact $list $item] + if {$pos < 0} return + set list [lreplace $list $pos $pos] + return + } + + # Delete item from list by name + # # ## ### ##### ######## ############# } namespace eval ::vc::tools::misc { - namespace export sp nsp max + namespace export sp nsp max ldelete } # ----------------------------------------------------------------------------- # Ready package provide vc::tools::misc 1.0 return