Check-in [3bde1a2e2f]
Not logged in
Overview

SHA1 Hash:3bde1a2e2ff4d72354c1729f9681711b83e38d26
Date: 2007-10-17 03:09:58
User: aku
Comment:Added new option --trunk-only, state and processing.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_option.tcl from [5618bdee19] to [90466e503f].

@@ -40,14 +40,14 @@
     # --ignore-conflicting-attics
     # --project
     # -v, --verbose
     # -q, --quiet
     # --state (conversion status, ala config.cache)
+    # --trunk-only
 
     # -o, --output
     # --dry-run
-    # --trunk-only
     # --force-branch RE
     # --force-tag RE
     # --symbol-transform RE:XX
     # --exclude
 
@@ -71,10 +71,11 @@
 		-v                          -
 		--verbose                   { log verbose }
 		-q                          -
 		--quiet                     { log quiet }
 		--state                     { state use [Value arguments] }
+		--trunk-only                { repository trunkonly! }
 		default {
 		    Usage $badoption$option\n$gethelp
 		}
 	    }
 	}

Modified tools/cvs2fossil/lib/c2f_repository.tcl from [ef903ed612] to [7f7328b5b7].

@@ -49,10 +49,13 @@
 	if {[lsearch -exact $myprojpaths $path] >= 0} return
 	lappend myprojpaths $path
 	return
     }
 
+    typemethod trunkonly! {} { set mytrunkonly 1 ; return }
+    typemethod trunkonly  {} { return $mytrunkonly }
+
     typemethod projects {} {
 	return [TheProjects]
     }
 
     typemethod base? {} { return $mybase }
@@ -220,10 +223,14 @@
     typevariable mysymbol -array {} ; # Map symbols identified by
 				      # project and name to their
 				      # id. This information is not
 				      # saved directly.
     typevariable mysymbolcnt     0  ; # Counter for symbol ids.
+
+    typevariable mytrunkonly     0  ; # Boolean flag. Set by option
+				      # processing when the user
+				      # requested a trunk-only import
 
     # # ## ### ##### ######## #############
     ## Internal methods
 
     proc .BaseLength {p} {