Skip to content

Commit 522b8d8

Browse files
committed
Fix the parent reporting, add a debugging macro
1 parent 7b1705a commit 522b8d8

File tree

1 file changed

+12
-4
lines changed
  • tred_extension/umr/contrib/umr

1 file changed

+12
-4
lines changed

tred_extension/umr/contrib/umr/umr.inc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- cperl -*-
22

33
#bind compare_trees to = menu Compare Trees
4+
#bind show_diff to ? menu Show Diff
45

56
{ package UMR;
67

@@ -209,12 +210,12 @@
209210
for my $parent (get_dag_parents($node)) {
210211
my $parent_id = $parent->{id};
211212
my @mapped_parents
212-
= sort grep defined,
213-
@{ $alignment->{n2w}[0][$root_index] }
213+
= map keys %$_, grep defined,
214+
@{ $alignment->{n2w}[1][$root_index] }
214215
{ keys %{ $mapping{'01'}{$parent_id} } };
215216
my @parents1
216-
= sort grep defined,
217-
@{ $alignment->{nw2}[1][$root_index] }
217+
= map keys %$_, grep defined,
218+
@{ $alignment->{n2w}[1][$root_index] }
218219
{ map $_->{id}, get_dag_parents($node1) };
219220
$node->{_diff}{parent}{$_} = 1
220221
for grep {
@@ -230,4 +231,11 @@
230231
}
231232
}
232233
}
234+
235+
sub show_diff {
236+
ChangingFile(0);
237+
use Data::Dumper;
238+
print Dumper $this->{_diff};
239+
}
233240
}
241+

0 commit comments

Comments
 (0)