Check-in [11e5d7ce42]
Not logged in
Overview

SHA1 Hash:11e5d7ce42e4734b6a7104a78e6fcbaa2217a07a
Date: 2007-11-06 04:57:15
User: aku
Comment:Started on pass 4, 'FilterSymbols'. Skeleton.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Added tools/cvs2fossil/lib/c2f_pfiltersym.tcl version [8221e38456]

@@ -1,1 +1,118 @@
+## -*- tcl -*-
+# # ## ### ##### ######## ############# #####################
+## Copyright (c) 2007 Andreas Kupries.
+#
+# This software is licensed as described in the file LICENSE, which
+# you should have received as part of this distribution.
+#
+# This software consists of voluntary contributions made by many
+# individuals.  For exact contribution history, see the revision
+# history and logs, available at http://fossil-scm.hwaci.com/fossil
+# # ## ### ##### ######## ############# #####################
+
+## Pass IV. Coming after the symbol collation pass this pass now
+## removes all revisions and symbols referencing any of the excluded
+## symbols from the persistent database.
+
+# # ## ### ##### ######## ############# #####################
+## Requirements
+
+package require Tcl 8.4                               ; # Required runtime.
+package require snit                                  ; # OO system.
+package require vc::tools::log                        ; # User feedback.
+package require vc::fossil::import::cvs::state        ; # State storage.
+
+# # ## ### ##### ######## ############# #####################
+## Register the pass with the management
+
+vc::fossil::import::cvs::pass define \
+    FilterSymbols \
+    {Filter symbols, remove all excluded pieces} \
+    ::vc::fossil::import::cvs::pass::filtersym
+
+# # ## ### ##### ######## ############# #####################
+##
+
+snit::type ::vc::fossil::import::cvs::pass::filtersym {
+    # # ## ### ##### ######## #############
+    ## Public API
+
+    typemethod setup {} {
+	# Define names and structure of the persistent state of this
+	# pass.
+
+	state reading symbol
+	state reading blocker
+	state reading parent
+	state reading preferedparent
+	state reading revision
+	state reading branch
+	state reading tag
+	return
+    }
+
+    typemethod load {} {
+	# 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 for the next one.
+	return
+    }
+
+    typemethod run {} {
+	# Pass manager interface. Executed to perform the
+	# functionality of the pass.
+
+	# The removal of excluded symbols and everything referencing
+	# to them is done completely in the database.
+
+	state transaction {
+	    FilterExcludedSymbols
+	}
+
+	log write 1 filtersym "Filtering completed"
+	return
+    }
+
+    typemethod discard {} {
+	# Pass manager interface. Executed for all passes after the
+	# run passes, to remove all data of this pass from the state,
+	# as being out of date.
+	return
+    }
+
+    # # ## ### ##### ######## #############
+    ## Internal methods
+
+    proc FilterExcludedSymbols {} {
+	state run {
+	}
+	return
+    }
+
+    # # ## ### ##### ######## #############
+    ## Configuration
+
+    pragma -hasinstances   no ; # singleton
+    pragma -hastypeinfo    no ; # no introspection
+    pragma -hastypedestroy no ; # immortal
+
+    # # ## ### ##### ######## #############
+}
+
+namespace eval ::vc::fossil::import::cvs::pass {
+    namespace export filtersym
+    namespace eval filtersym {
+	namespace import ::vc::fossil::import::cvs::state
+	namespace import ::vc::tools::log
+	log register filtersym
+    }
+}
+
+# # ## ### ##### ######## ############# #####################
+## Ready
 
+package provide vc::fossil::import::cvs::pass::filtersym 1.0
+return

Modified tools/cvs2fossil/lib/cvs2fossil.tcl from [c8735da950] to [a62e286ebf].

@@ -22,13 +22,14 @@
 # # ## ### ##### ######## ############# #####################
 ## Passes. The order in which the import passes are loaded is
 ## important. It is the same order they will register, and then be run
 ## in.
 
-package require vc::fossil::import::cvs::pass::collar  ; # Coll'ect Ar'chives.
-package require vc::fossil::import::cvs::pass::collrev ; # Coll'ect Rev'isions.
-package require vc::fossil::import::cvs::pass::collsym ; # Coll'ate Sym'bols
+package require vc::fossil::import::cvs::pass::collar    ; # Coll'ect Ar'chives.
+package require vc::fossil::import::cvs::pass::collrev   ; # Coll'ect Rev'isions.
+package require vc::fossil::import::cvs::pass::collsym   ; # Coll'ate Sym'bols
+package require vc::fossil::import::cvs::pass::filtersym ; # Filter'  Sym'bols
 
 # # ## ### ##### ######## ############# #####################
 ## Support for passes etc.
 
 package require vc::fossil::import::cvs::option ; # Cmd line parsing & database

Modified tools/cvs2fossil/lib/pkgIndex.tcl from [1cffea0d23] to [d11a0332fc].

@@ -12,10 +12,11 @@
 package ifneeded vc::fossil::import::cvs::option          1.0 [list source [file join $dir c2f_option.tcl]]
 package ifneeded vc::fossil::import::cvs::pass            1.0 [list source [file join $dir c2f_pass.tcl]]
 package ifneeded vc::fossil::import::cvs::pass::collar    1.0 [list source [file join $dir c2f_pcollar.tcl]]
 package ifneeded vc::fossil::import::cvs::pass::collrev   1.0 [list source [file join $dir c2f_pcollrev.tcl]]
 package ifneeded vc::fossil::import::cvs::pass::collsym   1.0 [list source [file join $dir c2f_pcollsym.tcl]]
+package ifneeded vc::fossil::import::cvs::pass::filtersym 1.0 [list source [file join $dir c2f_pfiltersym.tcl]]
 package ifneeded vc::fossil::import::cvs::project         1.0 [list source [file join $dir c2f_project.tcl]]
 package ifneeded vc::fossil::import::cvs::project::lodmgr 1.0 [list source [file join $dir c2f_plodmgr.tcl]]
 package ifneeded vc::fossil::import::cvs::project::rev    1.0 [list source [file join $dir c2f_prev.tcl]]
 package ifneeded vc::fossil::import::cvs::project::sym    1.0 [list source [file join $dir c2f_psym.tcl]]
 package ifneeded vc::fossil::import::cvs::project::trunk  1.0 [list source [file join $dir c2f_ptrunk.tcl]]