Fix an unusual nonterminating task graph node
Summary:
Fixes T12114. There were a couple of bugs here:
- We could draw too many joining lines if a node had a parent with multiple descendants.
- We could incorrectly ignore columns because of an `unset()`.
I //think// this fixes both things without collateral damage. This whole thing is a little hard to understand/debug and has grown beyond its original scope, so I'll probably rewrite it if there are more issues.
Test Plan:
- Unit tests.
- My local repro is clean now:
{F2424920}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T12114
Differential Revision: https://secure.phabricator.com/D17211
This commit is contained in:
@@ -50,7 +50,6 @@ final class PHUIDiffGraphView extends Phobject {
|
||||
|
||||
$thread_count = $pos;
|
||||
for ($n = 0; $n < $thread_count; $n++) {
|
||||
|
||||
if (empty($threads[$n])) {
|
||||
$line .= ' ';
|
||||
continue;
|
||||
@@ -60,7 +59,7 @@ final class PHUIDiffGraphView extends Phobject {
|
||||
if ($found) {
|
||||
$line .= ' ';
|
||||
$joins[] = $n;
|
||||
unset($threads[$n]);
|
||||
$threads[$n] = false;
|
||||
} else {
|
||||
$line .= 'o';
|
||||
$found = true;
|
||||
@@ -114,6 +113,7 @@ final class PHUIDiffGraphView extends Phobject {
|
||||
if ($thread_commit == $parent) {
|
||||
$found = true;
|
||||
$splits[] = $idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user