Overview
SHA1 Hash: | 4c8a5a44afb8f45d5e0740efe09ffac647aac950 |
---|---|
Date: | 2007-11-06 04:53:55 |
User: | aku |
Comment: | Fix in pass 3, do not compute prefered parents for the excluded symbols. Exclude them from the final check as well due to this. |
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_pcollsym.tcl from [e6931f2e38] to [cd17ca9f0f].
@@ -60,11 +60,16 @@ } return } typemethod load {} { - # TODO + # Pass manager interface. Executed to load data computed by + # this pass into memory when this pass is skipped instead of + # executed. + + # The results of this pass are fully in the persistent state, + # there is nothing to load. return } typemethod run {} { # Pass manager interface. Executed to perform the @@ -203,21 +208,27 @@ } proc DeterminePreferedParents {} { array set prefered {} + set excl [project::sym excluded] + # Phase I: Pull the possible parents, using sorting to put the # prefered parent of each symbol last among all # candidates, allowing us get the prefered one by - # each candidate overwriting all previous selections. + # each candidate overwriting all previous + # selections. Note that we ignore excluded symbol, we + # do not care about their prefered parents and do not + # attempt to compute them. foreach {s p sname pname prname} [state run { SELECT S.sid, P.pid, S.name, SB.name, PR.name FROM symbol S, parent P, symbol SB, project PR WHERE S.sid = P.sid AND P.pid = SB.sid AND S.pid = PR.pid + AND S.type != $excl ORDER BY P.n ASC, P.pid DESC -- Higher votes and smaller ids (= earlier branches) last -- We simply keep the last possible parent for each -- symbol. This parent will have the max number of votes -- for its symbol and will be the earliest created branch @@ -238,21 +249,24 @@ log write 3 pcollsym "$prname : '$sname's prefered parent is '$pname'" } # Phase III: Check the result that all symbols except for - # trunks have a prefered parent. + # trunks have a prefered parent. We also ignore + # excluded symbols, as we intentionally did not + # compute a prefered parent for them, see phase I. foreach {pname sname} [state run { - SELECT S.name, PR.name + SELECT PR.name, S.name FROM project PR, symbol S LEFT OUTER JOIN preferedparent P ON S.sid = P.sid WHERE P.pid IS NULL AND S.name != ':trunk:' AND S.pid = PR.pid + AND S.type != $excl }] { - trouble fatal "$prname : '$sname' has no prefered parent." + trouble fatal "$pname : '$sname' has no prefered parent." } # The reverse, having prefered parents for unknown symbols # cannot occur. return