Fossil SCM

Added placeholder code to the fossil accessor class for the import of a revision. currently only logging the call.

aku 2008-01-30 08:25 trunk
Commit f9e0d23d97e9bce240ff9ea8b9373304ef63bc6e
--- tools/cvs2fossil/lib/c2f_fossil.tcl
+++ tools/cvs2fossil/lib/c2f_fossil.tcl
@@ -92,10 +92,35 @@
9292
$self RestorePwd
9393
9494
log write 3 fossil Done.
9595
return [array get id]
9696
}
97
+
98
+ method importrevision {label user message date parent revisions} {
99
+ # TODO = Write the actual import, and up the log level.
100
+
101
+ log write 2 fossil {== $user @ [clock format $date]}
102
+ log write 2 fossil {-> $parent}
103
+ log write 2 fossil {%% [join [split $message \n] "\n%% "]}
104
+
105
+ set uuids {}
106
+ foreach {uuid fname revnr} $revisions {
107
+ lappend uuids $uuid
108
+ log write 2 fossil {** $fname/$revnr = <$uuid>}
109
+ }
110
+
111
+ # Massage the commit message to remember the old user name
112
+ # which did the commit in CVS.
113
+
114
+ set message "By $user:\n$message"
115
+
116
+ # run fossil test-command performing the import.
117
+ #
118
+
119
+ log write 2 fossil {== $label}
120
+ return $label ; # FAKE a uuid for the moment
121
+ }
97122
98123
method finalize {destination} {
99124
::file rename -force $myrepository $destination
100125
::file delete -force $myworkspace
101126
$self destroy
102127
--- tools/cvs2fossil/lib/c2f_fossil.tcl
+++ tools/cvs2fossil/lib/c2f_fossil.tcl
@@ -92,10 +92,35 @@
92 $self RestorePwd
93
94 log write 3 fossil Done.
95 return [array get id]
96 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
98 method finalize {destination} {
99 ::file rename -force $myrepository $destination
100 ::file delete -force $myworkspace
101 $self destroy
102
--- tools/cvs2fossil/lib/c2f_fossil.tcl
+++ tools/cvs2fossil/lib/c2f_fossil.tcl
@@ -92,10 +92,35 @@
92 $self RestorePwd
93
94 log write 3 fossil Done.
95 return [array get id]
96 }
97
98 method importrevision {label user message date parent revisions} {
99 # TODO = Write the actual import, and up the log level.
100
101 log write 2 fossil {== $user @ [clock format $date]}
102 log write 2 fossil {-> $parent}
103 log write 2 fossil {%% [join [split $message \n] "\n%% "]}
104
105 set uuids {}
106 foreach {uuid fname revnr} $revisions {
107 lappend uuids $uuid
108 log write 2 fossil {** $fname/$revnr = <$uuid>}
109 }
110
111 # Massage the commit message to remember the old user name
112 # which did the commit in CVS.
113
114 set message "By $user:\n$message"
115
116 # run fossil test-command performing the import.
117 #
118
119 log write 2 fossil {== $label}
120 return $label ; # FAKE a uuid for the moment
121 }
122
123 method finalize {destination} {
124 ::file rename -force $myrepository $destination
125 ::file delete -force $myworkspace
126 $self destroy
127

Keyboard Shortcuts

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