Differences From:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[c9270189c2]
- Added tracking of file removal in changesets.
by
aku on
2008-02-05 15:52:35.
[view]
To:
File
tools/cvs2fossil/lib/c2f_prev.tcl
part of check-in
[0d13da3018]
- Get the line of development for changesets directly from the items and their lod references. The in-memory data from the meta table is out-of-date since the adjustment of parents in pass 'FilterSymbols'. Print the LOD information when sorting the changesets.
by
aku on
2008-02-06 04:55:34.
[view]
@@ -77,8 +77,12 @@
append str "$mytype ${myid}${detail}>"
return $str
}
+ method lod {} {
+ return [$mytypeobj cs_lod $myitems]
+ }
+
method id {} { return $myid }
method items {} { return $mytitems }
method data {} { return [list $myproject $mytype $mysrcid] }
@@ -404,10 +408,15 @@
# will use the empty base revision as parent.
#
# - List of the file revisions in the changeset.
- struct::list assign [$myproject getmeta $mysrcid] __ branch user message
- struct::list assign $branch __ lodname
+ struct::list assign [$myproject getmeta $mysrcid] __ __ user message
+
+ # We derive the lod information directly from the revisions of
+ # the changeset, as the branch part of the meta data (s.a.) is
+ # outdated since pass FilterSymbols.
+
+ set lodname [$self lod]
log write 2 csets {Importing revision [$self str] on $lodname}
# Perform the import. As part of that we determine the parent
@@ -1284,8 +1293,23 @@
AND C.cid = CI.cid -- containing the branches
AND C.type = 2 -- which are branch changesets
}]]
}
+
+ # result = symbol name
+ typemethod cs_lod {revisions} {
+ # Determines the name of the symbol which is the line of
+ # development for the revisions in a changeset.
+
+ set theset ('[join $revisions {','}]')
+ return [state run [subst -nocommands -nobackslashes {
+ SELECT
+ DISTINCT L.name
+ FROM revision R, symbol L
+ WHERE R.rid in $theset -- Restrict to revisions of interest
+ AND L.sid = R.lod -- Get lod symbol of revision
+ }]]
+ }
}
# # ## ### ##### ######## ############# #####################
## Helper singleton. Commands for tag symbol changesets.
@@ -1337,8 +1361,23 @@
# result = list (changeset-id)
typemethod cs_successors {tags} {
# Tags have no successors.
return
+ }
+
+ # result = symbol name
+ typemethod cs_lod {tags} {
+ # Determines the name of the symbol which is the line of
+ # development for the tags in a changeset.
+
+ set theset ('[join $tags {','}]')
+ return [state run [subst -nocommands -nobackslashes {
+ SELECT
+ DISTINCT L.name
+ FROM tag T, symbol L
+ WHERE T.tid in $theset -- Restrict to tags of interest
+ AND L.sid = T.lod -- Get lod symbol of tag
+ }]]
}
}
# # ## ### ##### ######## ############# #####################
@@ -1470,8 +1509,23 @@
AND C.cid = CI.cid -- containing the subordinate tags
AND C.type = 1 -- which are tag changesets
}]]
return
+ }
+
+ # result = symbol name
+ typemethod cs_lod {branches} {
+ # Determines the name of the symbol which is the line of
+ # development for the branches in a changeset.
+
+ set theset ('[join $branches {','}]')
+ return [state run [subst -nocommands -nobackslashes {
+ SELECT
+ DISTINCT L.name
+ FROM branch B, symbol L
+ WHERE B.bid in $theset -- Restrict to branches of interest
+ AND L.sid = B.lod -- Get lod symbol of branch
+ }]]
}
typemethod limits {branches} {
# Notes. This method exists only for branches. It is needed to