+ };
+ my $pm = $pseudomerges[-1];
+ if (defined $pm) {
+ # To an extent, this is heurstic. Imports don't have
+ # a useful history of the debian/ branch. We assume
+ # that the first pseudomerge after an import has a
+ # useful history or debian/, and ignore the histories
+ # from later pseudomerge. Often the first pseudomerge
+ # will be the dgit import of the upload to the actual
+ # suite intended by the non-dgit NMUer, and later
+ # pseudomerges may represent in-archive copies.
+ my $ovwr = $pm->{Overwritten};
+ printf $report " PM=%s \@Ovewritten:%d", $pm, (scalar @$ovwr)
+ if $report;
+ if (@$ovwr != 1) {
+ return $bomb->();
+ }
+ $basis = walk
+ $ovwr->[0]{CommitId},
+ $nogenerate, $report,
+ 1, $depth+1;
+ } else {
+ # Everything is from this import.
+ printf $report " NoPM" if $report;
+
+ xxx set basis to undef or something to mean make origin
+ }