chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
deprecate 3.0 (quilt)
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index f724369ab36d40381eaceb9884a4383e1cc84919..9573adf2f304b7fa7eac5290b618f013d46b0987 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-42,7
+42,6
@@
our (@git) = qw(git);
our (@dget) = qw(dget);
our (@dput) = qw(dput);
our (@debsign) = qw(debsign);
our (@dget) = qw(dget);
our (@dput) = qw(dput);
our (@debsign) = qw(debsign);
-our (@cleancmd) = qw(debian/rules clean);
our $keyid;
our $debug = 0;
our $keyid;
our $debug = 0;
@@
-553,22
+552,14
@@
sub pull () {
}
sub check_not_dirty () {
}
sub check_not_dirty () {
- my $output = cmdoutput @git, qw(status --porcelain);
- if (length $output) {
- my $m = "tree dirty:\n$output\n";
- if (!$dryrun) {
- die $m;
- } else {
- warn $m;
- }
- }
+ runcmd @git, qw(diff --quiet);
}
}
-sub commit_quilty_patch () {
+sub commit_quilty_patch ($) {
+ my ($vsn) = @_;
my $output = cmdoutput @git, qw(status --porcelain);
my $output = cmdoutput @git, qw(status --porcelain);
- my $vsn = $dsc->{Version};
my %fixups = map {$_=>1}
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/^\?\? //;
my @files;
foreach my $l (split /\n/, $output) {
next unless $l =~ s/^\?\? //;
@@
-577,15
+568,15
@@
sub commit_quilty_patch () {
}
print DEBUG "checking for quilty\n", Dumper(\@files);
if (@files == 2) {
}
print DEBUG "checking for quilty\n", Dumper(\@files);
if (@files == 2) {
+ my $m = "Commit Debian 3.0 (quilt) metadata";
+ print "$m\n";
runcmd_ordryrun @git, qw(add), @files;
runcmd_ordryrun @git, qw(add), @files;
- runcmd_ordryrun
- @git, qw(commit -m), "Commit Debian 3.0 (quilt) metadata";
+ runcmd_ordryrun @git, qw(commit -m), $m;
}
}
sub dopush () {
print DEBUG "actually entering push\n";
}
}
sub dopush () {
print DEBUG "actually entering push\n";
- runcmd @cleancmd;
my $clogp = parsechangelog();
$package = $clogp->{Source};
my $dscfn = "${package}_$clogp->{Version}.dsc";
my $clogp = parsechangelog();
$package = $clogp->{Source};
my $dscfn = "${package}_$clogp->{Version}.dsc";
@@
-593,7
+584,8
@@
sub dopush () {
$dsc = parsecontrol("../$dscfn");
print DEBUG "format $dsc->{Format}\n";
if ($dsc->{Format} eq '3.0 (quilt)') {
$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();
}
check_not_dirty();
prep_ud();
@@
-743,6
+735,11
@@
sub cmd_build {
@ARGV;
}
@ARGV;
}
+sub cmd_quilt_fixup {
+ my $clogp = parsechangelog();
+ commit_quilty_patch($clogp->{Version});
+}
+
sub parseopts () {
my $om;
while (@ARGV) {
sub parseopts () {
my $om;
while (@ARGV) {
@@
-762,8
+759,6
@@
sub parseopts () {
push @$om, $2;
} elsif (m/^--existing-package=(.*)/s) {
$existing_package = $1;
push @$om, $2;
} elsif (m/^--existing-package=(.*)/s) {
$existing_package = $1;
- } elsif (m/^--clean-command=(.*)/s) {
- @cleancmd = split /\s+/, $1;
} else {
die "$_ ?";
}
} else {
die "$_ ?";
}
@@
-794,5
+789,5
@@
parseopts();
print STDERR "DRY RUN ONLY\n" if $dryrun;
die unless @ARGV;
my $cmd = shift @ARGV;
print STDERR "DRY RUN ONLY\n" if $dryrun;
die unless @ARGV;
my $cmd = shift @ARGV;
-
+$cmd =~ y/-/_/;
{ no strict qw(refs); &{"cmd_$cmd"}(); }
{ no strict qw(refs); &{"cmd_$cmd"}(); }