Fossil SCM
Fixed typo in a comment.
Commit
479c96c0fc60975d773568e321e53c31c71a6502
Parent
83ecb5b9453bfd6…
2 files changed
+3
-3
-160
| --- tools/cvs2fossil/lib/c2f_pcollsym.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_pcollsym.tcl | ||
| @@ -220,13 +220,13 @@ | ||
| 220 | 220 | |
| 221 | 221 | # Phase I: Pull the possible parents, using sorting to put the |
| 222 | 222 | # prefered parent of each symbol last among all |
| 223 | 223 | # candidates, allowing us get the prefered one by |
| 224 | 224 | # each candidate overwriting all previous |
| 225 | - # selections. Note that we ignore excluded symbol, we | |
| 226 | - # do not care about their prefered parents and do not | |
| 227 | - # attempt to compute them. | |
| 225 | + # selections. Note that we ignore excluded symbols, | |
| 226 | + # we do not care about their prefered parents and do | |
| 227 | + # not attempt to compute them. | |
| 228 | 228 | |
| 229 | 229 | state foreachrow { |
| 230 | 230 | SELECT S.sid AS xs, |
| 231 | 231 | P.pid AS xp, |
| 232 | 232 | S.name AS sname, |
| 233 | 233 | |
| 234 | 234 | DELETED tools/cvs2fossil/lib/c2f_pimport.tcl |
| --- tools/cvs2fossil/lib/c2f_pcollsym.tcl | |
| +++ tools/cvs2fossil/lib/c2f_pcollsym.tcl | |
| @@ -220,13 +220,13 @@ | |
| 220 | |
| 221 | # Phase I: Pull the possible parents, using sorting to put the |
| 222 | # prefered parent of each symbol last among all |
| 223 | # candidates, allowing us get the prefered one by |
| 224 | # each candidate overwriting all previous |
| 225 | # selections. Note that we ignore excluded symbol, we |
| 226 | # do not care about their prefered parents and do not |
| 227 | # attempt to compute them. |
| 228 | |
| 229 | state foreachrow { |
| 230 | SELECT S.sid AS xs, |
| 231 | P.pid AS xp, |
| 232 | S.name AS sname, |
| 233 | |
| 234 | ELETED tools/cvs2fossil/lib/c2f_pimport.tcl |
| --- tools/cvs2fossil/lib/c2f_pcollsym.tcl | |
| +++ tools/cvs2fossil/lib/c2f_pcollsym.tcl | |
| @@ -220,13 +220,13 @@ | |
| 220 | |
| 221 | # Phase I: Pull the possible parents, using sorting to put the |
| 222 | # prefered parent of each symbol last among all |
| 223 | # candidates, allowing us get the prefered one by |
| 224 | # each candidate overwriting all previous |
| 225 | # selections. Note that we ignore excluded symbols, |
| 226 | # we do not care about their prefered parents and do |
| 227 | # not attempt to compute them. |
| 228 | |
| 229 | state foreachrow { |
| 230 | SELECT S.sid AS xs, |
| 231 | P.pid AS xp, |
| 232 | S.name AS sname, |
| 233 | |
| 234 | ELETED tools/cvs2fossil/lib/c2f_pimport.tcl |
D
tools/cvs2fossil/lib/c2f_pimport.tcl
-160
| --- a/tools/cvs2fossil/lib/c2f_pimport.tcl | ||
| +++ b/tools/cvs2fossil/lib/c2f_pimport.tcl | ||
| @@ -1,160 +0,0 @@ | ||
| 1 | -## -*- tcl -*- | |
| 2 | -# # ## ### ##### ######## ############# ##################### | |
| 3 | -## Copyright (c) 2007-2008 Andreas Kupries. | |
| 4 | -# | |
| 5 | -# This software is licensed as described in the file LICENSE, which | |
| 6 | -# you should have received as part of this distribution. | |
| 7 | -# | |
| 8 | -# This software consists of voluntary contributions made by many | |
| 9 | -# individuals. For exact contribution history, see the revision | |
| 10 | -# history and logs, available at http://fossil-scm.hwaci.com/fossil | |
| 11 | -# # ## ### ##### ######## ############# ##################### | |
| 12 | - | |
| 13 | -## Pass XII. This is the first of the backend passes. It imports the | |
| 14 | -## changesets constructed by the previous passes, and all file | |
| 15 | -## revisions they refer to into one or more fossil repositories, one | |
| 16 | -## per project. | |
| 17 | - | |
| 18 | -# # ## ### ##### ######## ############# ##################### | |
| 19 | -## Requirements | |
| 20 | - | |
| 21 | -package require Tcl 8.4 ; # Required runtime. | |
| 22 | -package require snit ; # OO system. | |
| 23 | -package require vc::tools::log ; # User feedback. | |
| 24 | -package require vc::fossil::import::cvs::repository ; # Repository management. | |
| 25 | -package require vc::fossil::import::cvs::state ; # State storage. | |
| 26 | -package require vc::fossil::import::cvs::fossil ; # Access to fossil repositories. | |
| 27 | -package require vc::fossil::import::cvs::ristate ; # Import state (revisions) | |
| 28 | - | |
| 29 | -# # ## ### ##### ######## ############# ##################### | |
| 30 | -## Register the pass with the management | |
| 31 | - | |
| 32 | -vc::fossil::import::cvs::pass define \ | |
| 33 | - Import \ | |
| 34 | - {Import the changesets and file revisions into fossil repositories} \ | |
| 35 | - ::vc::fossil::import::cvs::pass::import | |
| 36 | - | |
| 37 | -# # ## ### ##### ######## ############# ##################### | |
| 38 | -## | |
| 39 | - | |
| 40 | -snit::type ::vc::fossil::import::cvs::pass::import { | |
| 41 | - # # ## ### ##### ######## ############# | |
| 42 | - ## Public API | |
| 43 | - | |
| 44 | - typemethod setup {} { | |
| 45 | - # Define the names and structure of the persistent state of | |
| 46 | - # this pass. | |
| 47 | - | |
| 48 | - state use project | |
| 49 | - state use file | |
| 50 | - state use revision | |
| 51 | - state use meta | |
| 52 | - state use author | |
| 53 | - state use cmessage | |
| 54 | - state use symbol | |
| 55 | - | |
| 56 | - # This data is actually transient, confined to this pass. We | |
| 57 | - # use the state storage only to keep the RAM usage low. | |
| 58 | - state extend revuuid { | |
| 59 | - rid INTEGER NOT NULL REFERENCES revision UNIQUE, | |
| 60 | - uuid INTEGER NOT NULL -- fossil id of the revision | |
| 61 | - -- unique within the project | |
| 62 | - } | |
| 63 | - | |
| 64 | - # This information is truly non-transient, needed by the next | |
| 65 | - # pass adding the tags. | |
| 66 | - | |
| 67 | - state extend csuuid { | |
| 68 | - cid INTEGER NOT NULL REFERENCES changeset UNIQUE, | |
| 69 | - uuid INTEGER NOT NULL -- fossil id of the changeset | |
| 70 | - -- unique within the project | |
| 71 | - } | |
| 72 | - return | |
| 73 | - } | |
| 74 | - | |
| 75 | - typemethod load {} { | |
| 76 | - # Pass manager interface. Executed to load data computed by | |
| 77 | - # this pass into memory when this pass is skipped instead of | |
| 78 | - # executed. | |
| 79 | - return | |
| 80 | - } | |
| 81 | - | |
| 82 | - typemethod run {} { | |
| 83 | - # Pass manager interface. Executed to perform the | |
| 84 | - # functionality of the pass. | |
| 85 | - | |
| 86 | - foreach project [repository projects] { | |
| 87 | - log write 1 import {Importing project "[$project base]"} | |
| 88 | - | |
| 89 | - set fossil [fossil %AUTO%] | |
| 90 | - set rstate [ristate %AUTO%] | |
| 91 | - | |
| 92 | - state transaction { | |
| 93 | - # Layer I: Files and their revisions | |
| 94 | - foreach file [$project files] { | |
| 95 | - $file pushto $fossil | |
| 96 | - } | |
| 97 | - # Layer II: Changesets | |
| 98 | - foreach {revision date} [$project revisionsinorder] { | |
| 99 | - $revision pushto $fossil $date $rstate | |
| 100 | - } | |
| 101 | - } | |
| 102 | - | |
| 103 | - $rstate destroy | |
| 104 | - | |
| 105 | - # At last copy the temporary repository file to its final | |
| 106 | - # destination and release the associated memory. | |
| 107 | - | |
| 108 | - set destination [$project base] | |
| 109 | - if {$destination eq ""} { | |
| 110 | - set destination [file tail [repository base?]] | |
| 111 | - } | |
| 112 | - append destination .fsl | |
| 113 | - | |
| 114 | - $fossil finalize $destination | |
| 115 | - } | |
| 116 | - | |
| 117 | - # This does not live beyond the pass. We use the state for the | |
| 118 | - # data despite its transient nature to keep the memory | |
| 119 | - # requirements down. | |
| 120 | - #state discard revuuid | |
| 121 | - return | |
| 122 | - } | |
| 123 | - | |
| 124 | - typemethod discard {} { | |
| 125 | - # Pass manager interface. Executed for all passes after the | |
| 126 | - # run passes, to remove all data of this pass from the state, | |
| 127 | - # as being out of date. | |
| 128 | - return | |
| 129 | - } | |
| 130 | - | |
| 131 | - # # ## ### ##### ######## ############# | |
| 132 | - ## Internal methods | |
| 133 | - | |
| 134 | - # # ## ### ##### ######## ############# | |
| 135 | - ## Configuration | |
| 136 | - | |
| 137 | - pragma -hasinstances no ; # singleton | |
| 138 | - pragma -hastypeinfo no ; # no introspection | |
| 139 | - pragma -hastypedestroy no ; # immortal | |
| 140 | - | |
| 141 | - # # ## ### ##### ######## ############# | |
| 142 | -} | |
| 143 | - | |
| 144 | -namespace eval ::vc::fossil::import::cvs::pass { | |
| 145 | - namespace export import | |
| 146 | - namespace eval import { | |
| 147 | - namespace import ::vc::fossil::import::cvs::repository | |
| 148 | - namespace import ::vc::fossil::import::cvs::state | |
| 149 | - namespace import ::vc::fossil::import::cvs::fossil | |
| 150 | - namespace import ::vc::fossil::import::cvs::ristate | |
| 151 | - namespace import ::vc::tools::log | |
| 152 | - log register import | |
| 153 | - } | |
| 154 | -} | |
| 155 | - | |
| 156 | -# # ## ### ##### ######## ############# ##################### | |
| 157 | -## Ready | |
| 158 | - | |
| 159 | -package provide vc::fossil::import::cvs::pass::import 1.0 | |
| 160 | -return |
| --- a/tools/cvs2fossil/lib/c2f_pimport.tcl | |
| +++ b/tools/cvs2fossil/lib/c2f_pimport.tcl | |
| @@ -1,160 +0,0 @@ | |
| 1 | ## -*- tcl -*- |
| 2 | # # ## ### ##### ######## ############# ##################### |
| 3 | ## Copyright (c) 2007-2008 Andreas Kupries. |
| 4 | # |
| 5 | # This software is licensed as described in the file LICENSE, which |
| 6 | # you should have received as part of this distribution. |
| 7 | # |
| 8 | # This software consists of voluntary contributions made by many |
| 9 | # individuals. For exact contribution history, see the revision |
| 10 | # history and logs, available at http://fossil-scm.hwaci.com/fossil |
| 11 | # # ## ### ##### ######## ############# ##################### |
| 12 | |
| 13 | ## Pass XII. This is the first of the backend passes. It imports the |
| 14 | ## changesets constructed by the previous passes, and all file |
| 15 | ## revisions they refer to into one or more fossil repositories, one |
| 16 | ## per project. |
| 17 | |
| 18 | # # ## ### ##### ######## ############# ##################### |
| 19 | ## Requirements |
| 20 | |
| 21 | package require Tcl 8.4 ; # Required runtime. |
| 22 | package require snit ; # OO system. |
| 23 | package require vc::tools::log ; # User feedback. |
| 24 | package require vc::fossil::import::cvs::repository ; # Repository management. |
| 25 | package require vc::fossil::import::cvs::state ; # State storage. |
| 26 | package require vc::fossil::import::cvs::fossil ; # Access to fossil repositories. |
| 27 | package require vc::fossil::import::cvs::ristate ; # Import state (revisions) |
| 28 | |
| 29 | # # ## ### ##### ######## ############# ##################### |
| 30 | ## Register the pass with the management |
| 31 | |
| 32 | vc::fossil::import::cvs::pass define \ |
| 33 | Import \ |
| 34 | {Import the changesets and file revisions into fossil repositories} \ |
| 35 | ::vc::fossil::import::cvs::pass::import |
| 36 | |
| 37 | # # ## ### ##### ######## ############# ##################### |
| 38 | ## |
| 39 | |
| 40 | snit::type ::vc::fossil::import::cvs::pass::import { |
| 41 | # # ## ### ##### ######## ############# |
| 42 | ## Public API |
| 43 | |
| 44 | typemethod setup {} { |
| 45 | # Define the names and structure of the persistent state of |
| 46 | # this pass. |
| 47 | |
| 48 | state use project |
| 49 | state use file |
| 50 | state use revision |
| 51 | state use meta |
| 52 | state use author |
| 53 | state use cmessage |
| 54 | state use symbol |
| 55 | |
| 56 | # This data is actually transient, confined to this pass. We |
| 57 | # use the state storage only to keep the RAM usage low. |
| 58 | state extend revuuid { |
| 59 | rid INTEGER NOT NULL REFERENCES revision UNIQUE, |
| 60 | uuid INTEGER NOT NULL -- fossil id of the revision |
| 61 | -- unique within the project |
| 62 | } |
| 63 | |
| 64 | # This information is truly non-transient, needed by the next |
| 65 | # pass adding the tags. |
| 66 | |
| 67 | state extend csuuid { |
| 68 | cid INTEGER NOT NULL REFERENCES changeset UNIQUE, |
| 69 | uuid INTEGER NOT NULL -- fossil id of the changeset |
| 70 | -- unique within the project |
| 71 | } |
| 72 | return |
| 73 | } |
| 74 | |
| 75 | typemethod load {} { |
| 76 | # Pass manager interface. Executed to load data computed by |
| 77 | # this pass into memory when this pass is skipped instead of |
| 78 | # executed. |
| 79 | return |
| 80 | } |
| 81 | |
| 82 | typemethod run {} { |
| 83 | # Pass manager interface. Executed to perform the |
| 84 | # functionality of the pass. |
| 85 | |
| 86 | foreach project [repository projects] { |
| 87 | log write 1 import {Importing project "[$project base]"} |
| 88 | |
| 89 | set fossil [fossil %AUTO%] |
| 90 | set rstate [ristate %AUTO%] |
| 91 | |
| 92 | state transaction { |
| 93 | # Layer I: Files and their revisions |
| 94 | foreach file [$project files] { |
| 95 | $file pushto $fossil |
| 96 | } |
| 97 | # Layer II: Changesets |
| 98 | foreach {revision date} [$project revisionsinorder] { |
| 99 | $revision pushto $fossil $date $rstate |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | $rstate destroy |
| 104 | |
| 105 | # At last copy the temporary repository file to its final |
| 106 | # destination and release the associated memory. |
| 107 | |
| 108 | set destination [$project base] |
| 109 | if {$destination eq ""} { |
| 110 | set destination [file tail [repository base?]] |
| 111 | } |
| 112 | append destination .fsl |
| 113 | |
| 114 | $fossil finalize $destination |
| 115 | } |
| 116 | |
| 117 | # This does not live beyond the pass. We use the state for the |
| 118 | # data despite its transient nature to keep the memory |
| 119 | # requirements down. |
| 120 | #state discard revuuid |
| 121 | return |
| 122 | } |
| 123 | |
| 124 | typemethod discard {} { |
| 125 | # Pass manager interface. Executed for all passes after the |
| 126 | # run passes, to remove all data of this pass from the state, |
| 127 | # as being out of date. |
| 128 | return |
| 129 | } |
| 130 | |
| 131 | # # ## ### ##### ######## ############# |
| 132 | ## Internal methods |
| 133 | |
| 134 | # # ## ### ##### ######## ############# |
| 135 | ## Configuration |
| 136 | |
| 137 | pragma -hasinstances no ; # singleton |
| 138 | pragma -hastypeinfo no ; # no introspection |
| 139 | pragma -hastypedestroy no ; # immortal |
| 140 | |
| 141 | # # ## ### ##### ######## ############# |
| 142 | } |
| 143 | |
| 144 | namespace eval ::vc::fossil::import::cvs::pass { |
| 145 | namespace export import |
| 146 | namespace eval import { |
| 147 | namespace import ::vc::fossil::import::cvs::repository |
| 148 | namespace import ::vc::fossil::import::cvs::state |
| 149 | namespace import ::vc::fossil::import::cvs::fossil |
| 150 | namespace import ::vc::fossil::import::cvs::ristate |
| 151 | namespace import ::vc::tools::log |
| 152 | log register import |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | # # ## ### ##### ######## ############# ##################### |
| 157 | ## Ready |
| 158 | |
| 159 | package provide vc::fossil::import::cvs::pass::import 1.0 |
| 160 | return |
| --- a/tools/cvs2fossil/lib/c2f_pimport.tcl | |
| +++ b/tools/cvs2fossil/lib/c2f_pimport.tcl | |
| @@ -1,160 +0,0 @@ | |