Artifact Content
Not logged in

Artifact 44f71078463b33427051428288410b62dda2df82

File tools/lib/import_map.tcl part of check-in [b504674c5f] - Fixed problems with the untested statistics module. Moved cset <-> uuid map out of cvs to control layer, separate package. Currently not really useful, will be needed when handling cvs branches. Moved some user feedback around, and the import control too. by aku on 2007-09-15 03:18:31.

# -----------------------------------------------------------------------------
# Management of the mapping between cvs changesets and fossil uuids.

# -----------------------------------------------------------------------------
# Requirements

package require Tcl 8.4
package require vc::tools::log  ; # User feedback

namespace eval ::vc::fossil::import::map {
    vc::tools::log::system map
    namespace import ::vc::tools::log::write
}

# -----------------------------------------------------------------------------
# API

#     vc::fossil::import::map
#         set cset uuid    - Associate changeset with uuid
#         get cset -> uuid - Retrieve uuid for changeset.

# -----------------------------------------------------------------------------
# API Implementation - Functionality

proc ::vc::fossil::import::map::set {cset uuid} {
    variable map
    ::set map($cset) $uuid
    write 2 map "== $uuid"
    return
}

proc ::vc::fossil::import::map::get {cset} {
    variable map
    return $map($cset)
}

# -----------------------------------------------------------------------------

namespace eval ::vc::fossil::import::map {
    variable  map    ; # Map from csets to uuids
    array set map {} ; #

    namespace export get set
}

# -----------------------------------------------------------------------------
# Ready

package provide vc::fossil::import::map 1.0
return