Diff
Not logged in

Differences From:

File tools/lib/cvs_csets.tcl part of check-in [a9dcf09124] - Trim the commit messages to remove irrelevant leading and trailing line-endings. by aku on 2007-09-20 07:33:12. [view]

To:

File tools/lib/cvs_csets.tcl part of check-in [72dac950c3] - Continued work on the import of branches. Main principle now is to handle the branches vertically. First the trunk, then the branch starting with the first unprocessed changeset, and so forth. Looks more promising than the previous approach. Currently handles just a bit over half of the test projects (11 of 21 in 6 repositories). by aku on 2007-09-26 05:06:18. [view]

@@ -4,10 +4,14 @@
 # -----------------------------------------------------------------------------
 # Requirements
 
 package require Tcl 8.4
+package require vc::cvs::ws::sig      ; # Changeset file/rev signatures
 
 namespace eval ::vc::cvs::ws::csets::Current {}
+namespace eval ::vc::cvs::ws::csets::sig {
+    namespace import ::vc::cvs::ws::sig::*
+}
 
 # -----------------------------------------------------------------------------
 # API
 
@@ -46,8 +50,16 @@
     variable csets
     return  $csets($id)
 }
 
+
+proc ::vc::cvs::ws::csets::DUMP {id} {
+    puts /${id}/_________________
+    array set cs [get $id]
+    parray cs
+    return
+}
+
 proc ::vc::cvs::ws::csets::num {} {
     variable csets
     return [array size csets]
 }
@@ -60,15 +72,24 @@
 
 proc ::vc::cvs::ws::csets::setParentOf {id parent} {
     variable csets
     lappend  csets($id) parent $parent
+
+    array set cs $csets($id)
+    sig::def            $id $parent $cs(added) $cs(changed) $cs(removed)
     return
 }
 
 proc ::vc::cvs::ws::csets::parentOf {id} {
     variable      csets
     array set cs $csets($id)
     return   $cs(parent)
+}
+
+proc ::vc::cvs::ws::csets::sameBranch {id parent tag} {
+    variable      csets
+    array set cs $csets($id)
+    return [sig::next $parent $cs(added) $cs(changed) $cs(removed) $tag $cs(date)]
 }
 
 # -----------------------------------------------------------------------------
 # Internal helper commands: Changeset inspection and construction.
@@ -216,12 +237,12 @@
 	variable  files
 	array set files {}   ; # file -> revision
     }
 
-    namespace export init add done get num isTrunk setParentOf parentOf
+    namespace export init add done get num isTrunk setParentOf parentOf sameBranch
 }
 
 # -----------------------------------------------------------------------------
 # Ready
 
 package provide vc::cvs::ws::csets 1.0
 return