Overview
SHA1 Hash: | 45cd12f05a0441b98bb91292c60ee8731aee0358 |
---|---|
Date: | 2007-09-13 06:03:30 |
User: | aku |
Comment: | Continuing namespace changes, fossil backend. |
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/lib/fossil.tcl from [71d028abee] to [d4147a8c46].
@@ -5,21 +5,21 @@ # Requirements package require Tcl 8.4 package require vc::tools::log ; # User feedback -namespace eval ::fossil { +namespace eval ::vc::fossil::ws { vc::tools::log::system fossil namespace import ::vc::tools::log::write } # ----------------------------------------------------------------------------- # API # Define repository file, and connect to workspace in CWD. -proc ::fossil::new {} { +proc ::vc::fossil::ws::new {} { variable fr [file normalize [fileutil::tempfile import2_fsl_rp_]] variable fossil # pwd = workspace exec $fossil new $fr ; # create and @@ -30,17 +30,17 @@ return $fr } # Move generated fossil repository to final destination -proc ::fossil::destination {path} { +proc ::vc::fossil::ws::destination {path} { variable fr file rename $fr $path return } -namespace eval ::fossil { +namespace eval ::vc::fossil::ws { # Repository file variable fr {} # Fossil application variable fossil [auto_execok fossil] @@ -49,19 +49,19 @@ # exact command used). And the file the data goes to. variable debugcommit 0 variable dcfile {} } -proc ::fossil::debugcommit {flag} { +proc ::vc::fossil::ws::debugcommit {flag} { variable debugcommit $flag if {$debugcommit} { variable dcfile [file normalize cvs2fossil_commit.tcl] } return } -proc ::fossil::commit {break appname nosign meta ignore} { +proc ::vc::fossil::ws::commit {break appname nosign meta ignore} { variable fossil variable lastuuid variable debugcommit variable dcfile @@ -148,14 +148,14 @@ } # ----------------------------------------------------------------------------- # Internal helper commands -proc ::fossil::IGNORE {ignore path} { +proc ::vc::fossil::ws::IGNORE {ignore path} { return [uplevel #0 [linsert $ignore end $path]] } # ----------------------------------------------------------------------------- # Ready -package provide fossil 1.0 +package provide vc::fossil::ws 1.0 return
Modified tools/lib/importcvs.tcl from [b9cf7cd8df] to [e0760f3260].
@@ -4,11 +4,11 @@ # ----------------------------------------------------------------------------- # Requirements package require Tcl 8.4 package require cvs ; # Frontend, reading from source repository -package require fossil ; # Backend, writing to destination repository. +package require vc::fossil::ws ; # Backend, writing to destination repository. package require vc::tools::log ; # User feedback namespace eval ::vc::fossil::import::cvs { vc::tools::log::system import namespace import ::vc::tools::log::write @@ -39,11 +39,11 @@ switch -exact -- $key { -debugcommit { if {![string is boolean -strict $value]} { return -code error "Expected boolean, got \"$value\"" } - fossil::debugcommit $value + vc::fossil::ws::debugcommit $value } -nosign { if {![string is boolean -strict $value]} { return -code error "Expected boolean, got \"$value\"" } @@ -76,12 +76,12 @@ set nto 0 write 0 import {Begin conversion} write 0 import {Setting up workspaces} - cvs::workspace ; # cd's to workspace - fossil::new ; # Uses cwd as workspace to connect to. + cvs::workspace ; # cd's to workspace + vc::fossil::ws::new ; # Uses cwd as workspace to connect to. set ntrunk [cvs::ntrunk] ; set ntfmt %[string length $ntrunk]s set nmax [cvs::ncsets] ; set nmfmt %[string length $nmax]s cvs::foreach_cset cset [cvs::root] { @@ -94,11 +94,11 @@ write 0 import "Within [format %.2f $tot] seconds (avg [format %.2f [expr {$tot/$nto}]] seconds/changeset)" if {$stopat == $cset} return cvs::wsclear - fossil::destination $dst + vc::fossil::ws::destination $dst write 0 import Ok. return } # ----------------------------------------------------------------------------- @@ -127,19 +127,19 @@ proc ::vc::fossil::import::cvs::OneChangeSet {cset} { variable nosign variable stopat if {$stopat == $cset} { - fossil::commit 1 cvs2fossil $nosign \ + vc::fossil::ws::commit 1 cvs2fossil $nosign \ [cvs::wssetup $cset] ::cvs::wsignore write 0 import Stopped. return -code break } set usec [lindex [time { foreach {uuid ad rm ch} \ - [fossil::commit 0 cvs2fossil $nosign \ + [vc::fossil::ws::commit 0 cvs2fossil $nosign \ [cvs::wssetup $cset] ::cvs::wsignore] \ break } 1] 0] cvs::uuid $cset $uuid
Modified tools/lib/pkgIndex.tcl from [8aad5ceaab] to [e2affafb1d].
@@ -1,6 +1,6 @@ if {![package vsatisfies [package require Tcl] 8.4]} return package ifneeded rcsparser 1.0 [list source [file join $dir rcsparser.tcl]] package ifneeded cvs 1.0 [list source [file join $dir cvs.tcl]] -package ifneeded fossil 1.0 [list source [file join $dir fossil.tcl]] +package ifneeded vc::fossil::ws 1.0 [list source [file join $dir fossil.tcl]] package ifneeded vc::fossil::import::cvs 1.0 [list source [file join $dir importcvs.tcl]] package ifneeded vc::tools::log 1.0 [list source [file join $dir log.tcl]]