@@ -139,8 +139,8 @@ proc getcommitlines {fd view} {
139
139
global commitlisted
140
140
global leftover commfd
141
141
global displayorder commitidx commitrow commitdata
142
- global parentlist childlist children curview hlview
143
- global vparentlist vchildlist vdisporder vcmitlisted
142
+ global parentlist children curview hlview
143
+ global vparentlist vdisporder vcmitlisted
144
144
145
145
set stuff [read $fd 500000]
146
146
if {$stuff == {}} {
@@ -237,12 +237,10 @@ proc getcommitlines {fd view} {
237
237
incr commitidx($view )
238
238
if {$view == $curview } {
239
239
lappend parentlist $olds
240
- lappend childlist $children($view,$id)
241
240
lappend displayorder $id
242
241
lappend commitlisted $listed
243
242
} else {
244
243
lappend vparentlist($view ) $olds
245
- lappend vchildlist($view ) $children($view,$id)
246
244
lappend vdisporder($view ) $id
247
245
lappend vcmitlisted($view ) $listed
248
246
}
@@ -1754,7 +1752,7 @@ proc unflatten {var l} {
1754
1752
1755
1753
proc showview {n} {
1756
1754
global curview viewdata viewfiles
1757
- global displayorder parentlist childlist rowidlist rowoffsets
1755
+ global displayorder parentlist rowidlist rowoffsets
1758
1756
global colormap rowtextx commitrow nextcolor canvxmax
1759
1757
global numcommits rowrangelist commitlisted idrowranges rowchk
1760
1758
global selectedline currentid canv canvy0
@@ -1763,7 +1761,7 @@ proc showview {n} {
1763
1761
global commitidx rowlaidout rowoptim
1764
1762
global commfd
1765
1763
global selectedview selectfirst
1766
- global vparentlist vchildlist vdisporder vcmitlisted
1764
+ global vparentlist vdisporder vcmitlisted
1767
1765
global hlview selectedhlview
1768
1766
1769
1767
if {$n == $curview } return
@@ -1789,7 +1787,6 @@ proc showview {n} {
1789
1787
stopfindproc
1790
1788
if {$curview >= 0} {
1791
1789
set vparentlist($curview ) $parentlist
1792
- set vchildlist($curview ) $childlist
1793
1790
set vdisporder($curview ) $displayorder
1794
1791
set vcmitlisted($curview ) $commitlisted
1795
1792
if {$phase ne {}} {
@@ -1828,7 +1825,6 @@ proc showview {n} {
1828
1825
set phase [lindex $v 0]
1829
1826
set displayorder $vdisporder($n)
1830
1827
set parentlist $vparentlist($n)
1831
- set childlist $vchildlist($n)
1832
1828
set commitlisted $vcmitlisted($n)
1833
1829
set rowidlist [lindex $v 1]
1834
1830
set rowoffsets [lindex $v 2]
@@ -1961,7 +1957,6 @@ proc addvhighlight {n} {
1961
1957
if {$n != $curview && ![info exists viewdata($n )]} {
1962
1958
set viewdata($n ) [list getcommits {{}} {{}} {} {} {} 0 0 0 {}]
1963
1959
set vparentlist($n ) {}
1964
- set vchildlist($n ) {}
1965
1960
set vdisporder($n ) {}
1966
1961
set vcmitlisted($n ) {}
1967
1962
start_rev_list $n
@@ -2430,17 +2425,15 @@ proc ntimes {n o} {
2430
2425
}
2431
2426
2432
2427
proc usedinrange {id l1 l2} {
2433
- global children commitrow childlist curview
2428
+ global children commitrow curview
2434
2429
2435
2430
if {[info exists commitrow($curview ,$id )]} {
2436
2431
set r $commitrow($curview,$id)
2437
2432
if {$l1 <= $r && $r <= $l2 } {
2438
2433
return [expr {$r - $l1 + 1}]
2439
2434
}
2440
- set kids [lindex $childlist $r ]
2441
- } else {
2442
- set kids $children($curview,$id)
2443
2435
}
2436
+ set kids $children($curview,$id)
2444
2437
foreach c $kids {
2445
2438
set r $commitrow($curview,$c)
2446
2439
if {$l1 <= $r && $r <= $l2 } {
@@ -2515,15 +2508,14 @@ proc initlayout {} {
2515
2508
global idinlist rowchk rowrangelist idrowranges
2516
2509
global numcommits canvxmax canv
2517
2510
global nextcolor
2518
- global parentlist childlist children
2511
+ global parentlist
2519
2512
global colormap rowtextx
2520
2513
global selectfirst
2521
2514
2522
2515
set numcommits 0
2523
2516
set displayorder {}
2524
2517
set commitlisted {}
2525
2518
set parentlist {}
2526
- set childlist {}
2527
2519
set rowrangelist {}
2528
2520
set nextcolor 0
2529
2521
set rowidlist {{}}
@@ -2721,7 +2713,7 @@ proc readdiffindex {fd serial} {
2721
2713
proc layoutrows {row endrow last} {
2722
2714
global rowidlist rowoffsets displayorder
2723
2715
global uparrowlen downarrowlen maxwidth mingaplen
2724
- global childlist parentlist
2716
+ global children parentlist
2725
2717
global idrowranges
2726
2718
global commitidx curview
2727
2719
global idinlist rowchk rowrangelist
@@ -2771,7 +2763,7 @@ proc layoutrows {row endrow last} {
2771
2763
lappend idlist $id
2772
2764
lset rowidlist $row $idlist
2773
2765
set z {}
2774
- if {[ lindex $childlist $row ] ne {}} {
2766
+ if {$children($curview,$id) ne {}} {
2775
2767
set z [expr {[llength [lindex $rowidlist [expr {$row -1}]]] - $col }]
2776
2768
unset idinlist($id )
2777
2769
}
@@ -2830,7 +2822,7 @@ proc layoutrows {row endrow last} {
2830
2822
proc addextraid {id row} {
2831
2823
global displayorder commitrow commitinfo
2832
2824
global commitidx commitlisted
2833
- global parentlist childlist children curview
2825
+ global parentlist children curview
2834
2826
2835
2827
incr commitidx($curview )
2836
2828
lappend displayorder $id
@@ -2844,7 +2836,6 @@ proc addextraid {id row} {
2844
2836
if {![info exists children($curview ,$id )]} {
2845
2837
set children($curview ,$id ) {}
2846
2838
}
2847
- lappend childlist $children($curview,$id)
2848
2839
}
2849
2840
2850
2841
proc layouttail {} {
@@ -3729,7 +3720,7 @@ proc show_status {msg} {
3729
3720
# The new commit will be displayed on row $row and the commits
3730
3721
# on that row and below will move down one row.
3731
3722
proc insertrow {row newcmit} {
3732
- global displayorder parentlist childlist commitlisted children
3723
+ global displayorder parentlist commitlisted children
3733
3724
global commitrow curview rowidlist rowoffsets numcommits
3734
3725
global rowrangelist rowlaidout rowoptim numcommits
3735
3726
global selectedline rowchk commitidx
@@ -3741,11 +3732,10 @@ proc insertrow {row newcmit} {
3741
3732
set p [lindex $displayorder $row ]
3742
3733
set displayorder [linsert $displayorder $row $newcmit ]
3743
3734
set parentlist [linsert $parentlist $row $p ]
3744
- set kids [ lindex $childlist $row ]
3735
+ set kids $children($curview,$p)
3745
3736
lappend kids $newcmit
3746
- lset childlist $row $kids
3747
- set childlist [linsert $childlist $row {}]
3748
3737
set children($curview ,$p ) $kids
3738
+ set children($curview ,$newcmit ) {}
3749
3739
set commitlisted [linsert $commitlisted $row 1]
3750
3740
set l [llength $displayorder ]
3751
3741
for {set r $row } {$r < $l } {incr r} {
@@ -3802,7 +3792,7 @@ proc insertrow {row newcmit} {
3802
3792
3803
3793
# Remove a commit that was inserted with insertrow on row $row.
3804
3794
proc removerow {row} {
3805
- global displayorder parentlist childlist commitlisted children
3795
+ global displayorder parentlist commitlisted children
3806
3796
global commitrow curview rowidlist rowoffsets numcommits
3807
3797
global rowrangelist idrowranges rowlaidout rowoptim numcommits
3808
3798
global linesegends selectedline rowchk commitidx
@@ -3816,13 +3806,11 @@ proc removerow {row} {
3816
3806
set p [lindex $parentlist $row ]
3817
3807
set displayorder [lreplace $displayorder $row $row ]
3818
3808
set parentlist [lreplace $parentlist $row $row ]
3819
- set childlist [lreplace $childlist $row $row ]
3820
3809
set commitlisted [lreplace $commitlisted $row $row ]
3821
- set kids [ lindex $childlist $row ]
3810
+ set kids $children($curview,$p)
3822
3811
set i [lsearch -exact $kids $id ]
3823
3812
if {$i >= 0} {
3824
3813
set kids [lreplace $kids $i $i ]
3825
- lset childlist $row $kids
3826
3814
set children($curview ,$p ) $kids
3827
3815
}
3828
3816
set l [llength $displayorder ]
@@ -4264,7 +4252,7 @@ proc dispnexttag {} {
4264
4252
proc selectline {l isnew} {
4265
4253
global canv canv2 canv3 ctext commitinfo selectedline
4266
4254
global displayorder linehtag linentag linedtag
4267
- global canvy0 linespc parentlist childlist
4255
+ global canvy0 linespc parentlist children curview
4268
4256
global currentid sha1entry
4269
4257
global commentend idtags linknum
4270
4258
global mergemax numcommits pending_select
@@ -4375,7 +4363,7 @@ proc selectline {l isnew} {
4375
4363
}
4376
4364
}
4377
4365
4378
- foreach c [ lindex $childlist $l ] {
4366
+ foreach c $children($curview,$id) {
4379
4367
append headers " Child: [ commit_descriptor $c ] "
4380
4368
}
4381
4369
0 commit comments