runcmd @git, qw(diff --quiet);
}
-sub commit_quilty_patch () {
+sub commit_quilty_patch ($) {
+ my ($vsn) = @_;
my $output = cmdoutput @git, qw(status --porcelain);
- my $vsn = $dsc->{Version};
my %fixups = map {$_=>1}
- (".pc/debian-changes-$vsn/","debian/patches/debian-changes-2.8-5");
+ (".pc/debian-changes-$vsn/","debian/patches/debian-changes-$vsn");
my @files;
foreach my $l (split /\n/, $output) {
next unless $l =~ s/^\?\? //;
$dsc = parsecontrol("../$dscfn");
print DEBUG "format $dsc->{Format}\n";
if ($dsc->{Format} eq '3.0 (quilt)') {
- commit_quilty_patch();
+ print "Format \`$dsc->{Format}', urgh\n";
+ commit_quilty_patch($dsc->{Version});
}
check_not_dirty();
prep_ud();
@ARGV;
}
+sub cmd_quilt_fixup {
+ my $clogp = parsechangelog();
+ commit_quilty_patch($clogp->{Version});
+}
+
sub parseopts () {
my $om;
while (@ARGV) {
print STDERR "DRY RUN ONLY\n" if $dryrun;
die unless @ARGV;
my $cmd = shift @ARGV;
-
+$cmd =~ y/-/_/;
{ no strict qw(refs); &{"cmd_$cmd"}(); }