Check-in [1a20a81f33]
Not logged in
Overview

SHA1 Hash:1a20a81f33681c6a06a36e149567b80b350ad9c9
Date: 2007-12-05 07:53:11
User: aku
Comment:Integrated the new fossil management class with the option processor. New option --fossil to specify the fossil executable if it was not found in the PATH, or to overide the PATH.
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 [6e1ccf1f24] to [490b79f397].

@@ -21,10 +21,11 @@
 package require Tcl 8.4                               ; # Required runtime.
 package require snit                                  ; # OO system.
 package require vc::tools::trouble                    ; # Error reporting.
 package require vc::tools::log                        ; # User feedback.
 package require vc::tools::misc                       ; # Misc. path reformatting.
+package require vc::fossil::import::cvs::fossil       ; # Fossil repository access
 package require vc::fossil::import::cvs::pass         ; # Pass management
 package require vc::fossil::import::cvs::pass::collar ; # Pass I.
 package require vc::fossil::import::cvs::repository   ; # Repository management
 package require vc::fossil::import::cvs::state        ; # State storage
 package require vc::fossil::import::cvs::integrity    ; # State integrity checks.
@@ -47,10 +48,11 @@
     # -q, --quiet
     # --state (conversion status, ala config.cache)
     # --trunk-only
     # --exclude, --force-tag, --force-branch
     # --batch
+    # --fossil PATH
 
     # -o, --output
     # --dry-run
     # --symbol-transform RE:XX
 
@@ -82,10 +84,11 @@
 		--force-branch              { project::sym forcebranch [Value arguments] }
 		--batch                     { log noprogress }
 		--dots                      { cyclebreaker dotsto [Value arguments] }
 		--watch                     { cyclebreaker watch  [Value arguments] }
 		--statesavequeriesto        { state savequeriesto [Value arguments] }
+		--fossil                    { fossil setlocation  [Value arguments] }
 		default {
 		    Usage $badoption$option\n$gethelp
 		}
 	    }
 	}
@@ -144,10 +147,16 @@
 	trouble info "                               Force the named symbol from all or just"
 	trouble info "                               the specified project to be converted as"
 	trouble info "                               branch. Both project and symbol names"
 	trouble info "                               are glob patterns."
 	trouble info ""
+	trouble info "  Output control options"
+	trouble info ""
+	trouble info "    --fossil PATH              Specify where to find the fossil execu-"
+	trouble info "                               table if cv2fossil could not find it in"
+	trouble info "                               the PATH."
+	trouble info ""
 	trouble info "  Debug options"
 	trouble info ""
 	trouble info "    --dots PATH                Write the changeset graphs before, after,"
 	trouble info "                               and during breaking the of cycles to the"
 	trouble info "                               direcotry PATH, using GraphViz's dot format"
@@ -201,10 +210,11 @@
 
     proc Validate {} {
 	# Prevent in-depth validation if the options were already bad.
 	trouble abort?
 
+	fossil     validate
 	repository validate
 	state      setup
 
 	trouble abort?
 	return
@@ -222,10 +232,11 @@
 
 namespace eval ::vc::fossil::import::cvs {
     namespace export option
     namespace eval option {
 	namespace import ::vc::tools::misc::striptrailingslash
+	namespace import ::vc::fossil::import::cvs::fossil
 	namespace import ::vc::fossil::import::cvs::pass
 	namespace import ::vc::fossil::import::cvs::pass::collar
 	namespace import ::vc::fossil::import::cvs::cyclebreaker
 	namespace import ::vc::fossil::import::cvs::repository
 	namespace import ::vc::fossil::import::cvs::state