Differences From:
File
tools/cvs2fossil/lib/c2f_file.tcl
part of check-in
[bd131addb9]
- Started to flesh out the handling symbols and revisions coming in from the rcs parser. First fragments of revision object. Type methods for classification of revision numb ers.
by
aku on
2007-10-12 05:56:46.
[view]
To:
File
tools/cvs2fossil/lib/c2f_file.tcl
part of check-in
[da9295c6f6]
- Continued to flesh out revision and symbol processing. Started on the project level classses.
by
aku on
2007-10-12 07:18:27.
[view]
@@ -19,8 +19,9 @@
package require Tcl 8.4 ; # Required runtime.
package require snit ; # OO system.
package require struct::set ; # Set operations.
package require vc::fossil::import::cvs::file::rev ; # CVS per file revisions.
+package require vc::fossil::import::cvs::file::sym ; # CVS per file symbols.
# # ## ### ##### ######## ############# #####################
##
@@ -38,22 +39,8 @@
method project {} { return $myproject }
# # ## ### ##### ######## #############
## Methods required for the class to be a sink of the rcs parser
-
- method begin {} {}
- method done {} {}
- method admindone {} {}
-
- method sethead {h} {}
- method setprincipalbranch {b} {}
-
- method deftag {s r} {}
- method setcomment {c} {}
- method setdesc {d} {}
-
- method def {rev date author state next branches} {}
- method extend {rev commitmsg deltarange} {}
#method begin {} {puts begin}
#method sethead {h} {puts head=$h}
#method setprincipalbranch {b} {puts pb=$b}
@@ -120,9 +107,9 @@
trouble fatal "File $mypath contains duplicate definitions for revision $revnr."
return
}
- set myrev($revnr) [rev %AUTO% $date $author $state $self]
+ set myrev($revnr) [rev %AUTO% $revnr $date $author $state $self]
RecordBasicDependencies $revnr $next
return
}
@@ -154,8 +141,12 @@
# object uses this to complete its meta data set.
$rev setcommitmsg $cm
$rev settext $deltarange
+
+ if {![rev istrunkrevnr $revnr]} {
+ $rev setbranch [[$self Rev2Branch $revnr] name]
+ }
# If this is revision 1.1, we have to determine whether the
# file seems to have been created through 'cvs add' instead of
# 'cvs import'. This can be done by looking at the un-
@@ -232,21 +223,15 @@
log write 1 file "In '$mypath': Branch '$branchnr' named '[$mybranches($branchnr) name]'"
log write 1 file "Cannot have second name '$name', ignoring it"
return
}
- set sym ""
- set branch ""
- #TODO set sym [$myproject getsymbol $name ]
- #TODO set tag [sym %AUTO% branch $sym $branchnr]
+ set branch [sym %AUTO% branch $branchnr [$myproject getsymbol $name]]
set mybranches($branchnr) $branch
return $branch
}
method AddTag {name revnr} {
- set sym ""
- set tag ""
- #TODO set sym [$myproject getsymbol $name ]
- #TODO set tag [sym %AUTO% tag $sym $revnr]
+ set tag [sym %AUTO% tag $revnr [$myproject getsymbol $name]]
lappend mytags($revnr) $tag
return $tag
}
@@ -298,8 +283,9 @@
namespace export file
namespace eval file {
# Import not required, already a child namespace.
# namespace import vc::fossil::import::cvs::file::rev
+ # namespace import vc::fossil::import::cvs::file::sym
}
}
# # ## ### ##### ######## ############# #####################