Fossil SCM

Deactivated caching of the nextmap/premap data, with the indices the retrieval seems to be fast enough to allow us to reduce mem consumption. Tweaked log output, and sql formatting.

aku 2007-12-02 03:49 trunk
Commit ac026148036db7afcd882f3760455f02f4f74ce9
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -127,22 +127,24 @@
127127
return [array get tmp]
128128
}
129129
130130
# item -> list (item)
131131
method nextmap {} {
132
- if {[llength $mynextmap]} { return $mynextmap }
132
+ #if {[llength $mynextmap]} { return $mynextmap }
133133
$mytypeobj successors tmp $myitems
134
- set mynextmap [array get tmp]
135
- return $mynextmap
134
+ return [array get tmp]
135
+ #set mynextmap [array get tmp]
136
+ #return $mynextmap
136137
}
137138
138139
# item -> list (item)
139140
method premap {} {
140
- if {[llength $mypremap]} { return $mypremap }
141
+ #if {[llength $mypremap]} { return $mypremap }
141142
$mytypeobj predecessors tmp $myitems
142
- set mypremap [array get tmp]
143
- return $mypremap
143
+ return [array get tmp]
144
+ #set mypremap [array get tmp]
145
+ #return $mypremap
144146
}
145147
146148
method breakinternaldependencies {} {
147149
148150
##
@@ -364,11 +366,11 @@
364366
set mychangesets [lreplace $mychangesets $pos $pos]
365367
return
366368
}
367369
368370
method loopcheck {} {
369
- log write 7 csets {Checking [$self str] /[llength $myitems]}
371
+ log write 7 csets {Checking [$self str] for loops /[llength $myitems]}
370372
371373
if {![struct::set contains [$self successors] $self]} {
372374
return 0
373375
}
374376
if {[log verbosity?] < 8} { return 1 }
@@ -737,18 +739,19 @@
737739
return
738740
}
739741
740742
# Print identifying data for a revision (project, file, dotted rev
741743
# number), for high verbosity log output.
744
+ # TODO: Replace with call to itemstr (list rev $id)
742745
743746
proc PD {id} {
744747
foreach {p f r} [state run {
745748
SELECT P.name , F.name, R.rev
746749
FROM revision R, file F, project P
747750
WHERE R.rid = $id
748
- AND R.fid = F.fid
749
- AND F.pid = P.pid
751
+ AND F.fid = R.fid
752
+ AND P.pid = F.pid
750753
}] break
751754
return "'$p : $f/$r'"
752755
}
753756
754757
# Printing one or more ranges, formatted, and only their border to
755758
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -127,22 +127,24 @@
127 return [array get tmp]
128 }
129
130 # item -> list (item)
131 method nextmap {} {
132 if {[llength $mynextmap]} { return $mynextmap }
133 $mytypeobj successors tmp $myitems
134 set mynextmap [array get tmp]
135 return $mynextmap
 
136 }
137
138 # item -> list (item)
139 method premap {} {
140 if {[llength $mypremap]} { return $mypremap }
141 $mytypeobj predecessors tmp $myitems
142 set mypremap [array get tmp]
143 return $mypremap
 
144 }
145
146 method breakinternaldependencies {} {
147
148 ##
@@ -364,11 +366,11 @@
364 set mychangesets [lreplace $mychangesets $pos $pos]
365 return
366 }
367
368 method loopcheck {} {
369 log write 7 csets {Checking [$self str] /[llength $myitems]}
370
371 if {![struct::set contains [$self successors] $self]} {
372 return 0
373 }
374 if {[log verbosity?] < 8} { return 1 }
@@ -737,18 +739,19 @@
737 return
738 }
739
740 # Print identifying data for a revision (project, file, dotted rev
741 # number), for high verbosity log output.
 
742
743 proc PD {id} {
744 foreach {p f r} [state run {
745 SELECT P.name , F.name, R.rev
746 FROM revision R, file F, project P
747 WHERE R.rid = $id
748 AND R.fid = F.fid
749 AND F.pid = P.pid
750 }] break
751 return "'$p : $f/$r'"
752 }
753
754 # Printing one or more ranges, formatted, and only their border to
755
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -127,22 +127,24 @@
127 return [array get tmp]
128 }
129
130 # item -> list (item)
131 method nextmap {} {
132 #if {[llength $mynextmap]} { return $mynextmap }
133 $mytypeobj successors tmp $myitems
134 return [array get tmp]
135 #set mynextmap [array get tmp]
136 #return $mynextmap
137 }
138
139 # item -> list (item)
140 method premap {} {
141 #if {[llength $mypremap]} { return $mypremap }
142 $mytypeobj predecessors tmp $myitems
143 return [array get tmp]
144 #set mypremap [array get tmp]
145 #return $mypremap
146 }
147
148 method breakinternaldependencies {} {
149
150 ##
@@ -364,11 +366,11 @@
366 set mychangesets [lreplace $mychangesets $pos $pos]
367 return
368 }
369
370 method loopcheck {} {
371 log write 7 csets {Checking [$self str] for loops /[llength $myitems]}
372
373 if {![struct::set contains [$self successors] $self]} {
374 return 0
375 }
376 if {[log verbosity?] < 8} { return 1 }
@@ -737,18 +739,19 @@
739 return
740 }
741
742 # Print identifying data for a revision (project, file, dotted rev
743 # number), for high verbosity log output.
744 # TODO: Replace with call to itemstr (list rev $id)
745
746 proc PD {id} {
747 foreach {p f r} [state run {
748 SELECT P.name , F.name, R.rev
749 FROM revision R, file F, project P
750 WHERE R.rid = $id
751 AND F.fid = R.fid
752 AND P.pid = F.pid
753 }] break
754 return "'$p : $f/$r'"
755 }
756
757 # Printing one or more ranges, formatted, and only their border to
758

Keyboard Shortcuts

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