Fossil SCM

Simplified the code for excluding non-trunk revisions a bit, using higher-level methods for some changes. Added missing revision destruction.

aku 2007-10-21 07:08 trunk
Commit 436f17a5f0a396584f9caffff3b92061b777b891
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -662,10 +662,11 @@
662662
# Change the type of first (typically from Change to Add):
663663
$first retype add
664664
665665
# Move any tags and branches from the old to the new root.
666666
$rev11 movesymbolsto $first
667
+ $rev11 destroy
667668
}
668669
669670
# Mark all the special revisions as such
670671
foreach rev $revlist {
671672
log write 3 file "Revision on default branch: [$rev revnr]"
@@ -941,17 +942,12 @@
941942
942943
set rev12 [$last defaultbranchchild]
943944
$rev12 cutdefaultbranchparent
944945
$last cutdefaultbranchchild
945946
946
- # TODO :: Combine into one method 'changeparent', or
947
- # 'moveparent', etc.
948
- $rev12 cutfromparent
949
- $rev12 setparent $last
950
-
951
- $last cutfromchild
952
- $last setchild $rev12
947
+ $rev12 changeparent $last
948
+ $last changechild $rev12
953949
954950
ldelete myroots $rev12
955951
956952
# Note and remember that the type of rev12 was already
957953
# adjusted by AdjustNonTrunkDefaultBranch, so we don't
958954
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -662,10 +662,11 @@
662 # Change the type of first (typically from Change to Add):
663 $first retype add
664
665 # Move any tags and branches from the old to the new root.
666 $rev11 movesymbolsto $first
 
667 }
668
669 # Mark all the special revisions as such
670 foreach rev $revlist {
671 log write 3 file "Revision on default branch: [$rev revnr]"
@@ -941,17 +942,12 @@
941
942 set rev12 [$last defaultbranchchild]
943 $rev12 cutdefaultbranchparent
944 $last cutdefaultbranchchild
945
946 # TODO :: Combine into one method 'changeparent', or
947 # 'moveparent', etc.
948 $rev12 cutfromparent
949 $rev12 setparent $last
950
951 $last cutfromchild
952 $last setchild $rev12
953
954 ldelete myroots $rev12
955
956 # Note and remember that the type of rev12 was already
957 # adjusted by AdjustNonTrunkDefaultBranch, so we don't
958
--- tools/cvs2fossil/lib/c2f_file.tcl
+++ tools/cvs2fossil/lib/c2f_file.tcl
@@ -662,10 +662,11 @@
662 # Change the type of first (typically from Change to Add):
663 $first retype add
664
665 # Move any tags and branches from the old to the new root.
666 $rev11 movesymbolsto $first
667 $rev11 destroy
668 }
669
670 # Mark all the special revisions as such
671 foreach rev $revlist {
672 log write 3 file "Revision on default branch: [$rev revnr]"
@@ -941,17 +942,12 @@
942
943 set rev12 [$last defaultbranchchild]
944 $rev12 cutdefaultbranchparent
945 $last cutdefaultbranchchild
946
947 $rev12 changeparent $last
948 $last changechild $rev12
 
 
 
 
 
949
950 ldelete myroots $rev12
951
952 # Note and remember that the type of rev12 was already
953 # adjusted by AdjustNonTrunkDefaultBranch, so we don't
954
--- tools/cvs2fossil/lib/c2f_frev.tcl
+++ tools/cvs2fossil/lib/c2f_frev.tcl
@@ -124,10 +124,13 @@
124124
method setchild {child} {
125125
if {$mychild ne ""} { trouble internal "Child already defined" }
126126
set mychild $child
127127
return
128128
}
129
+
130
+ method changeparent {parent} { set myparent $parent ; return }
131
+ method changechild {child} { set mychild $child ; return }
129132
130133
method parent {} { return $myparent }
131134
method child {} { return $mychild }
132135
133136
# Branch linkage ______________________
134137
--- tools/cvs2fossil/lib/c2f_frev.tcl
+++ tools/cvs2fossil/lib/c2f_frev.tcl
@@ -124,10 +124,13 @@
124 method setchild {child} {
125 if {$mychild ne ""} { trouble internal "Child already defined" }
126 set mychild $child
127 return
128 }
 
 
 
129
130 method parent {} { return $myparent }
131 method child {} { return $mychild }
132
133 # Branch linkage ______________________
134
--- tools/cvs2fossil/lib/c2f_frev.tcl
+++ tools/cvs2fossil/lib/c2f_frev.tcl
@@ -124,10 +124,13 @@
124 method setchild {child} {
125 if {$mychild ne ""} { trouble internal "Child already defined" }
126 set mychild $child
127 return
128 }
129
130 method changeparent {parent} { set myparent $parent ; return }
131 method changechild {child} { set mychild $child ; return }
132
133 method parent {} { return $myparent }
134 method child {} { return $mychild }
135
136 # Branch linkage ______________________
137

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button