Fossil SCM

Tinkered with the revision information transfered from a changeset to push, to the fossil accessor code, modified the logging as well.

aku 2008-01-31 06:25 trunk
Commit 7c43583de113828f5a83a01dd25e5223311a7cb8
--- tools/cvs2fossil/lib/c2f_fossil.tcl
+++ tools/cvs2fossil/lib/c2f_fossil.tcl
@@ -96,30 +96,33 @@
9696
}
9797
9898
method importrevision {label user message date parent revisions} {
9999
# TODO = Write the actual import, and up the log level.
100100
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
-
111101
# Massage the commit message to remember the old user name
112102
# which did the commit in CVS.
113103
114104
set message "By $user:\n$message"
105
+
106
+ log write 2 fossil {== $user @ [clock format $date]}
107
+ log write 2 fossil {-> $parent}
108
+ log write 2 fossil {%% [join [split $message \n] "\n%% "]}
109
+
110
+ lappend cmd Do test-import-manifest $date $message
111
+ if {$parent ne ""} { lappend cmd --parents $parent }
112
+ lappend cmd --files
113
+ foreach {frid fpath flabel} $revisions {
114
+ lappend cmd $frid $fpath
115
+ log write 2 fossil {** <[format %5d $frid]> = $flabel}
116
+ }
115117
116118
# run fossil test-command performing the import.
117
- #
119
+ # set uuid [eval $cmd]
120
+ set uuid $label ; # FAKE an uuid for the moment
118121
119
- log write 2 fossil {== $label}
120
- return $label ; # FAKE a uuid for the moment
122
+ log write 2 fossil {== $uuid}
123
+ return $uuid
121124
}
122125
123126
method finalize {destination} {
124127
::file rename -force $myrepository $destination
125128
::file delete -force $myworkspace
126129
--- tools/cvs2fossil/lib/c2f_fossil.tcl
+++ tools/cvs2fossil/lib/c2f_fossil.tcl
@@ -96,30 +96,33 @@
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
--- tools/cvs2fossil/lib/c2f_fossil.tcl
+++ tools/cvs2fossil/lib/c2f_fossil.tcl
@@ -96,30 +96,33 @@
96 }
97
98 method importrevision {label user message date parent revisions} {
99 # TODO = Write the actual import, and up the log level.
100
 
 
 
 
 
 
 
 
 
 
101 # Massage the commit message to remember the old user name
102 # which did the commit in CVS.
103
104 set message "By $user:\n$message"
105
106 log write 2 fossil {== $user @ [clock format $date]}
107 log write 2 fossil {-> $parent}
108 log write 2 fossil {%% [join [split $message \n] "\n%% "]}
109
110 lappend cmd Do test-import-manifest $date $message
111 if {$parent ne ""} { lappend cmd --parents $parent }
112 lappend cmd --files
113 foreach {frid fpath flabel} $revisions {
114 lappend cmd $frid $fpath
115 log write 2 fossil {** <[format %5d $frid]> = $flabel}
116 }
117
118 # run fossil test-command performing the import.
119 # set uuid [eval $cmd]
120 set uuid $label ; # FAKE an uuid for the moment
121
122 log write 2 fossil {== $uuid}
123 return $uuid
124 }
125
126 method finalize {destination} {
127 ::file rename -force $myrepository $destination
128 ::file delete -force $myworkspace
129
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -429,18 +429,18 @@
429429
}
430430
431431
proc Getrevisioninfo {revisions} {
432432
set theset ('[join $revisions {','}]')
433433
set revisions {}
434
- foreach {uuid fname revnr} [state run [subst -nocommands -nobackslashes {
435
- SELECT U.uuid, F.name, R.rev
434
+ foreach {frid path fname revnr} [state run [subst -nocommands -nobackslashes {
435
+ SELECT U.uuid, F.visible, F.name, R.rev
436436
FROM revision R, revuuid U, file F
437437
WHERE R.rid IN $theset -- All specified revisions
438438
AND U.rid = R.rid -- get fossil uuid of revision
439439
AND F.fid = R.fid -- get file of revision
440440
}]] {
441
- lappend revisions $uuid $fname $revnr
441
+ lappend revisions $frid $path $fname/$revnr
442442
}
443443
return $revisions
444444
}
445445
446446
proc Getparent {sv lodname project} {
447447
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -429,18 +429,18 @@
429 }
430
431 proc Getrevisioninfo {revisions} {
432 set theset ('[join $revisions {','}]')
433 set revisions {}
434 foreach {uuid fname revnr} [state run [subst -nocommands -nobackslashes {
435 SELECT U.uuid, F.name, R.rev
436 FROM revision R, revuuid U, file F
437 WHERE R.rid IN $theset -- All specified revisions
438 AND U.rid = R.rid -- get fossil uuid of revision
439 AND F.fid = R.fid -- get file of revision
440 }]] {
441 lappend revisions $uuid $fname $revnr
442 }
443 return $revisions
444 }
445
446 proc Getparent {sv lodname project} {
447
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -429,18 +429,18 @@
429 }
430
431 proc Getrevisioninfo {revisions} {
432 set theset ('[join $revisions {','}]')
433 set revisions {}
434 foreach {frid path fname revnr} [state run [subst -nocommands -nobackslashes {
435 SELECT U.uuid, F.visible, F.name, R.rev
436 FROM revision R, revuuid U, file F
437 WHERE R.rid IN $theset -- All specified revisions
438 AND U.rid = R.rid -- get fossil uuid of revision
439 AND F.fid = R.fid -- get file of revision
440 }]] {
441 lappend revisions $frid $path $fname/$revnr
442 }
443 return $revisions
444 }
445
446 proc Getparent {sv lodname project} {
447

Keyboard Shortcuts

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