Check-in [436f17a5f0]
Not logged in
Overview

SHA1 Hash:436f17a5f0a396584f9caffff3b92061b777b891
Date: 2007-10-21 07:08:28
User: aku
Comment:Simplified the code for excluding non-trunk revisions a bit, using higher-level methods for some changes. Added missing revision destruction.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_file.tcl from [3105dc0d62] to [55db58afdc].

@@ -662,10 +662,11 @@
 	    # Change the type of first (typically from Change to Add):
 	    $first retype add
 
 	    # Move any tags and branches from the old to the new root.
 	    $rev11 movesymbolsto $first
+	    $rev11 destroy
 	}
 
 	# Mark all the special revisions as such
 	foreach rev $revlist {
 	    log write 3 file "Revision on default branch: [$rev revnr]"
@@ -941,17 +942,12 @@
 
 	    set rev12 [$last defaultbranchchild]
 	    $rev12 cutdefaultbranchparent
 	    $last  cutdefaultbranchchild
 
-	    # TODO :: Combine into one method 'changeparent', or
-	    # 'moveparent', etc.
-	    $rev12 cutfromparent
-	    $rev12 setparent $last
-
-	    $last cutfromchild
-	    $last setchild $rev12
+	    $rev12 changeparent $last
+	    $last  changechild $rev12
 
 	    ldelete myroots $rev12
 
 	    # Note and remember that the type of rev12 was already
 	    # adjusted by AdjustNonTrunkDefaultBranch, so we don't

Modified tools/cvs2fossil/lib/c2f_frev.tcl from [590fdb0ca9] to [383bf3739a].

@@ -124,10 +124,13 @@
     method setchild {child} {
 	if {$mychild ne ""} { trouble internal "Child already defined" }
 	set mychild $child
 	return
     }
+
+    method changeparent {parent} { set myparent $parent ; return }
+    method changechild  {child}  { set mychild  $child  ; return }
 
     method parent {} { return $myparent }
     method child  {} { return $mychild  }
 
     # Branch linkage ______________________