|
2 | 2 | # Tcl ignores the next line -*- tcl -*- \
|
3 | 3 | exec wish "$0" -- "$@"
|
4 | 4 |
|
5 |
| -# Copyright © 2005-2008 Paul Mackerras. All rights reserved. |
| 5 | +# Copyright © 2005-2009 Paul Mackerras. All rights reserved. |
6 | 6 | # This program is free software; it may be used, copied, modified
|
7 | 7 | # and distributed under the terms of the GNU General Public Licence,
|
8 | 8 | # either version 2, or (at your option) any later version.
|
@@ -989,6 +989,18 @@ proc removefakerow {id} {
|
989 | 989 | drawvisible
|
990 | 990 | }
|
991 | 991 |
|
| 992 | +proc real_children {vp} { |
| 993 | + global children nullid nullid2 |
| 994 | + |
| 995 | + set kids {} |
| 996 | + foreach id $children($vp) { |
| 997 | + if {$id ne $nullid && $id ne $nullid2} { |
| 998 | + lappend kids $id |
| 999 | + } |
| 1000 | + } |
| 1001 | + return $kids |
| 1002 | +} |
| 1003 | + |
992 | 1004 | proc first_real_child {vp} {
|
993 | 1005 | global children nullid nullid2
|
994 | 1006 |
|
@@ -8463,23 +8475,23 @@ proc do_cmp_commits {a b} {
|
8463 | 8475 | }
|
8464 | 8476 | }
|
8465 | 8477 | if {$skipa} {
|
8466 |
| - if {[llength $children($curview,$a)] != 1} { |
| 8478 | + set kids [real_children $curview,$a] |
| 8479 | + if {[llength $kids] != 1} { |
8467 | 8480 | $ctext insert end "\n"
|
8468 | 8481 | appendshortlink $a [mc "Commit "] \
|
8469 |
| - [mc " has %s children - stopping\n" \ |
8470 |
| - [llength $children($curview,$a)]] |
| 8482 | + [mc " has %s children - stopping\n" [llength $kids]] |
8471 | 8483 | break
|
8472 | 8484 | }
|
8473 |
| - set a [lindex $children($curview,$a) 0] |
| 8485 | + set a [lindex $kids 0] |
8474 | 8486 | }
|
8475 | 8487 | if {$skipb} {
|
8476 |
| - if {[llength $children($curview,$b)] != 1} { |
| 8488 | + set kids [real_children $curview,$b] |
| 8489 | + if {[llength $kids] != 1} { |
8477 | 8490 | appendshortlink $b [mc "Commit "] \
|
8478 |
| - [mc " has %s children - stopping\n" \ |
8479 |
| - [llength $children($curview,$b)]] |
| 8491 | + [mc " has %s children - stopping\n" [llength $kids]] |
8480 | 8492 | break
|
8481 | 8493 | }
|
8482 |
| - set b [lindex $children($curview,$b) 0] |
| 8494 | + set b [lindex $kids 0] |
8483 | 8495 | }
|
8484 | 8496 | }
|
8485 | 8497 | $ctext conf -state disabled
|
|
0 commit comments