Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/misc.tcl part of check-in [52f2254007] - Continued work on pass I. Filled in the repository management, and basic implementation of project objects. Missing are persistence and the foundation for that (cache database). by aku on 2007-10-04 04:34:59. [view]

To:

File tools/cvs2fossil/lib/misc.tcl part of check-in [4e49cbf03b] - New helper command to delete item from list by name instead of position. by aku on 2007-10-17 03:08:06. [view]

@@ -49,16 +49,26 @@
 	}
 	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