Overview
SHA1 Hash: | 59207428e2f5aa5c25925ba14275bb0853a6b0c3 |
---|---|
Date: | 2007-11-22 02:58:09 |
User: | aku |
Comment: | Moved the functionality for splitting a changeset based on the sets of revisions for the fragments to be into a separate command, and into the changeset class, for use outside of changeset links. |
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/c2f_prev.tcl from [458c8956e4] to [da85eb5f98].
@@ -62,10 +62,11 @@ } } return [lsort -unique $csets] } + # revision -> list (revision) method nextmap {} { if {[llength $mynextmap]} { return $mynextmap } PullSuccessorRevisions tmp $myrevisions set mynextmap [array get tmp] return $mynextmap @@ -251,10 +252,30 @@ } foreach r $myrevisions { unset myrevmap($r) } set pos [lsearch -exact $mychangesets $self] set mychangesets [lreplace $mychangesets $pos $pos] return + } + + typemethod split {cset args} { + # As part of the creation of the new changesets specified in + # ARGS as sets of revisions, all subsets of CSET's revision + # set, CSET will be dropped from all databases, in and out of + # memory, and then destroyed. + + struct::list assign [$cset data] project cstype cssrc + + $cset drop + $cset destroy + + set newcsets {} + foreach fragmentrevisions $args { + lappend newcsets [$type %AUTO% $project $cstype $cssrc $fragmentrevisions] + } + + foreach c $newcsets { $c persist } + return $newcsets } # # ## ### ##### ######## ############# ## State @@ -567,13 +588,11 @@ # # ## ### ##### ######## ############# typevariable mychangesets {} ; # List of all known changesets. typevariable myrevmap -array {} ; # Map from revisions to their changeset. - typemethod all {} { - return $mychangesets - } + typemethod all {} { return $mychangesets } # # ## ### ##### ######## ############# ## Configuration pragma -hastypeinfo no ; # no type introspection
Modified tools/cvs2fossil/lib/c2f_prevlink.tcl from [01734176b9] to [b25fedd0c7].
@@ -148,26 +148,14 @@ # predecessors. set mycategory(next) [concat $mycategory(next) $mycategory(none) \ $mycategory(pass)] } - # We now have the split in the mycategory(prev|next) - # elements. As part of the creation of the new changesets the - # old one is dropped from all databases, in and out of memory, - # and then destroyed. - - struct::list assign [$mycset data] project cstype cssrc - $mycset drop - $mycset destroy - - set newcsets {} - lappend newcsets [project::rev %AUTO% $project $cstype $cssrc $mycategory(prev)] - lappend newcsets [project::rev %AUTO% $project $cstype $cssrc $mycategory(next)] - - foreach c $newcsets { $c persist } - - return $newcsets + # We now have the revisions for the two fragments to be in the + # (prev|next) elements of mycategory. + + return [project::rev split $mycset $mycategory(prev) $mycategory(next)] } # # ## ### ##### ######## ############# ## State