chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 14 Jun 2017 20:50:55 +0000 (21:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Aug 2017 14:43:40 +0000 (15:43 +0100)
git-debrebase

index 55f92e39b8858274ad820b7dfcafd2e9295c372b..5be04b9be1fe1058c8a9f528745596f19e7e2fe0 100755 (executable)
@@ -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