chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-debrebase: git-debrebase fixes
[dgit.git]
/
git-debrebase
diff --git
a/git-debrebase
b/git-debrebase
index 1b77b084fe6760cf5acd3c527cf7ce1106f197b4..d6bd8a5148c356380d4ec196d57260e7fa3e5669 100755
(executable)
--- a/
git-debrebase
+++ b/
git-debrebase
@@
-110,6
+110,11
@@
use Data::Dumper;
use Debian::Dgit qw(:DEFAULT $wa);
use Debian::Dgit qw(:DEFAULT $wa);
+sub badusage ($) {
+ my ($m) = @_;
+ die "bad usage: $m\n";
+}
+
sub cfg ($) {
my ($k) = @_;
$/ = "\0";
sub cfg ($) {
my ($k) = @_;
$/ = "\0";
@@
-393,13
+398,13
@@
sub walk {
if ($differs & D_UPS) {
printf $report " D_UPS" if $report;
push @deb_cl, {
if ($differs & D_UPS) {
printf $report " D_UPS" if $report;
push @deb_cl, {
- %
r
,
+ %
$cl
,
SpecialMethod => 'DgitImportUpstreamUpdate',
$xmsg->("convert dgit import: debian changes")
};
}
push @deb_cl, {
SpecialMethod => 'DgitImportUpstreamUpdate',
$xmsg->("convert dgit import: debian changes")
};
}
push @deb_cl, {
- %
r
,
+ %
$cl
,
SpecialMethod => 'DgitImportDebianUpdate',
$xmsg->("convert dgit import: upstream changes")
};
SpecialMethod => 'DgitImportDebianUpdate',
$xmsg->("convert dgit import: upstream changes")
};
@@
-459,9
+464,9
@@
sub walk {
$current_method = $cl;
next;
}
$current_method = $cl;
next;
}
- $method = $cl->{SpecialMethod} // $current_method;
+
my
$method = $cl->{SpecialMethod} // $current_method;
my @parents = ($build);
my @parents = ($build);
- my $cltree = $cl->{CommitId}
+ my $cltree = $cl->{CommitId}
;
if ($method eq 'Debian') {
$read_tree_debian->($cltree);
} elsif ($method eq 'Upstream') {
if ($method eq 'Debian') {
$read_tree_debian->($cltree);
} elsif ($method eq 'Upstream') {
@@
-475,7
+480,7
@@
sub walk {
next;
} elsif ($method eq 'DgitImportDebianUpdate') {
$read_tree_debian->($cltree);
next;
} elsif ($method eq 'DgitImportDebianUpdate') {
$read_tree_debian->($cltree);
- $rm_tree_cached(qw(debian/patches));
+ $rm_tree_cached
->
(qw(debian/patches));
} elsif ($method eq 'DgitImportUpstreamUpdate') {
$read_tree_upstream->($cltree);
push @parents, map { $_->{CommitId} } @{ $cl->{OrigParents} };
} elsif ($method eq 'DgitImportUpstreamUpdate') {
$read_tree_upstream->($cltree);
push @parents, map { $_->{CommitId} } @{ $cl->{OrigParents} };
@@
-487,28
+492,28
@@
sub walk {
my $ch = $cl->{Hdr};
$ch =~ s{^tree .*}{tree $newtree}m or confess "$ch ?";
$ch =~ s{^parent .*\n}{}m;
my $ch = $cl->{Hdr};
$ch =~ s{^tree .*}{tree $newtree}m or confess "$ch ?";
$ch =~ s{^parent .*\n}{}m;
- $ch =~ s{(?=^author}{
+ $ch =~ s{(?=^author
)
}{
map { "parent $_\n" } @parents
}me or confess "$ch ?";
map { "parent $_\n" } @parents
}me or confess "$ch ?";
- if ($rewrit
e
) {
+ if ($rewrit
ing
) {
$ch =~ s{^committer .*$}{$committer_authline}m
or confess "$ch ?";
}
$ch =~ s{^committer .*$}{$committer_authline}m
or confess "$ch ?";
}
- my $cf = "$rd/m$rewrit
e"
-
open CD, ">", $cf or die $!;
- print CD $ch, "\n", $cl->{Msg}
;
or die $!;
+ my $cf = "$rd/m$rewrit
ing";
+ open CD, ">", $cf or die $!;
+ print CD $ch, "\n", $cl->{Msg} or die $!;
close CD or die $!;
my @cmd = (@git, qw(hash-object));
close CD or die $!;
my @cmd = (@git, qw(hash-object));
- push @cmd, qw(-w) if $rewrit
e
;
+ push @cmd, qw(-w) if $rewrit
ing
;
push @cmd, qw(-t commit), $cf;
my $newcommit = cmdoutput @cmd;
push @cmd, qw(-t commit), $cf;
my $newcommit = cmdoutput @cmd;
- confess "$ch ?" unless $rewrit
e
or $newcommit eq $cl->{CommitId};
+ confess "$ch ?" unless $rewrit
ing
or $newcommit eq $cl->{CommitId};
$build = $newcommit;
}
};
runcmd @git, qw(diff-tree --quiet),
$build = $newcommit;
}
};
runcmd @git, qw(diff-tree --quiet),
- map { $wantdebonly ? "$_:debian" : $_ }
,
+ map { $wantdebonly ? "$_:debian" : $_ }
$input, $build;
return ($build, $breakwater);
$input, $build;
return ($build, $breakwater);