From: Ian Jackson Date: Wed, 14 Jun 2017 20:50:55 +0000 (+0100) Subject: git-debrebase: wip X-Git-Tag: archive/debian/5.0~349 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3033adc17477a44618d73cd2b49d3c791870b284;p=dgit.git git-debrebase: wip --- diff --git a/git-debrebase b/git-debrebase index 55f92e39..5be04b9b 100755 --- a/git-debrebase +++ b/git-debrebase @@ -373,7 +373,7 @@ sub walk { $prline->("$cl->{CommitId} $cl->{Type}"); $found{$ty. ( defined($st) ? "-$st" : '' )}++; push @processed, $cl; - my $p0 = @[ $cl->{Parents} }==1 ? $cl->{Parents}[0]{CommitId} : undef; + my $p0 = @{ $cl->{Parents} }==1 ? $cl->{Parents}[0]{CommitId} : undef; if ($ty eq 'AddPatches') { $cur = $p0; $rewrite_from_here->(); @@ -407,17 +407,17 @@ sub walk { $cur = $ty->{Contributor}; next; } elsif ($ty eq 'BreakwaterUpstreamMerge') { - push @deb_cl, { ExactlyParents -> [$cur] }; + push @deb_cl, { ExactlyParents => [$cur] }; $prline->("PreviousBreakwater"); last; } elsif ($ty eq 'DgitImportUnpatched') { my $pm = $pseudomerges[-1]; if (defined $pm) { - # To an extent, this is heurstic. Imports don't have + # To an extent, this is heuristic. 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 + # useful history of debian/, and ignore the histories + # from later pseudomerges. 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. @@ -427,7 +427,7 @@ sub walk { if (@$ovwrs != 1) { return $bomb->(); } - my $ovwr = $ovwr->[0]{CommitId}; + my $ovwr = $ovwrs->[0]{CommitId}; printf $report " Overwr=%s", $ovwr if $report; # This import has a tree which is just like a # breakwater tree, but it has the wrong history. It @@ -445,7 +445,7 @@ sub walk { SpecialMethod => 'DgitImportDebianUpdate', $xmsg->("convert dgit import: debian changes") }; - my $differs = get_differs $ovwr, $cl->{Tree}; + my $differs = (get_differs $ovwr, $cl->{Tree}); printf $report " Differs=%#x", $differs if $report; if ($differs & D_UPS) { printf $report " D_UPS" if $report; @@ -467,7 +467,7 @@ sub walk { 1, $depth+1; push @deb_cl, { ExactlyParents => [$basis] }; $rewrite_from_here->(); - last + last; } else { # Everything is from this import. This kind of import # is already in valid breakwater format, with the