From: Ian Jackson Date: Tue, 22 Oct 2013 13:53:11 +0000 (+0100) Subject: Merge branch 'master' into wip.remote X-Git-Tag: debian/0.17_experimental1~10 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=59235957912b6f55e150d533749aad62b1647e8e Merge branch 'master' into wip.remote Conflicts: debian/changelog dgit --- 59235957912b6f55e150d533749aad62b1647e8e diff --cc debian/changelog index 883b8552,c1f58d3b..6142585f --- a/debian/changelog +++ b/debian/changelog @@@ -1,26 -1,13 +1,36 @@@ + dgit (0.16) unstable; urgency=high + + * Format `(3.0) quilt' fixup does not mind extraneous other files + in the build tree (e.g., build products and logs). Closes: #727053. + * Set autoflush on stdout, to get better ordering of debugging + etc. output when stdout is redirected. + * New --damp-run mode, for more convenient and fuller testing etc. + + -- Ian Jackson Tue, 22 Oct 2013 13:06:54 +0100 + +dgit (0.16~experimental3) experimental; urgency=low + + * Minor fixes arising from changes since 0.15. + + -- Ian Jackson Mon, 21 Oct 2013 15:31:59 +0100 + +dgit (0.16~experimental2) experimental; urgency=low + + * WIP remote functionality. Untested, do not use. + * Some code motion and cleanups. + * push actually takes an optional suite, like it says in the synopsis. + * Command execution reports from --dry-run go to stderr. + * Support --gpg=... to provide a replacement command for gpg. + * Support --ssh=... and --ssh:... to affect how we run ssh. + + -- Ian Jackson Mon, 21 Oct 2013 14:29:56 +0100 + +dgit (0.16~experimental1) experimental; urgency=low + + * WIP remote functionality. Untested, do not use. + + -- Ian Jackson Tue, 24 Sep 2013 23:08:27 +0100 + dgit (0.15) unstable; urgency=low * Better handling of packages pushed using dgit and stuck in NEW. diff --cc dgit index f6c129a6,ba5f1ba8..e46da88a --- a/dgit +++ b/dgit @@@ -1015,11 -829,11 +1026,11 @@@ sub clone ($) close H or die $!; runcmd @git, qw(remote add), 'origin', access_giturl(); if (check_for_git()) { - print "fetching existing git history\n"; + progress "fetching existing git history"; git_fetch_us(); - runcmd_ordryrun @git, qw(fetch origin); + runcmd_ordryrun_local @git, qw(fetch origin); } else { - print "starting new git history\n"; + progress "starting new git history"; } fetch_from_archive() or no_such_package; runcmd @git, qw(reset --hard), lrref(); @@@ -1062,20 -875,16 +1072,16 @@@ sub commit_quilty_patch () next unless $l =~ m/\S/; if ($l =~ m{^(?:\?\?| M) (.pc|debian/patches)}) { $adds{$1}++; - } else { - print STDERR "git status: $l\n"; - $bad++; } } - fail "unexpected output from git status (is tree clean?)" if $bad; if (!%adds) { - print "nothing quilty to commit, ok.\n"; + progress "nothing quilty to commit, ok."; return; } - runcmd_ordryrun @git, qw(add), sort keys %adds; + runcmd_ordryrun_local @git, qw(add), sort keys %adds; my $m = "Commit Debian 3.0 (quilt) metadata"; - print "$m\n"; + progress "$m"; - runcmd_ordryrun @git, qw(commit -m), $m; + runcmd_ordryrun_local @git, qw(commit -m), $m; } sub madformat ($) { @@@ -1242,46 -959,40 +1248,46 @@@ sub dopush () ($changesfile) = @cs; } } - my $changes = parsecontrol($changesfile,$changesfile); - foreach my $field (qw(Source Distribution Version)) { - $changes->{$field} eq $clogp->{$field} or - fail "changes field $field \`$changes->{$field}'". - " does not match changelog \`$clogp->{$field}'"; - } - my $tag = debiantag($dversion); + + responder_send_file('changes',$changesfile); + + my $tfn = sub { ".git/dgit/tag$_[0]"; }; + my ($tagobjfn) = + $we_are_responder + ? responder_receive_files('signed-tag', $tfn->('.signed.tmp')) + : push_mktag($head,$clogp,$tag, + $dsc,"../$dscfn", + $changesfile,$changesfile, + $tfn); + + my $tag_obj_hash = cmdoutput @git, qw(hash-object -w -t tag), $tagobjfn; + runcmd_ordryrun @git, qw(verify-tag), $tag_obj_hash; - runcmd_ordryrun @git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash; ++ runcmd_ordryrun_local @git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash; + runcmd_ordryrun @git, qw(tag -v --), $tag; + if (!check_for_git()) { create_remote_git_repo(); } runcmd_ordryrun @git, qw(push),access_giturl(),"HEAD:".rrref(); runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD'; - if (!$dryrun) { - rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!"; - } else { - print "[new .dsc left in $dscfn.tmp]\n"; - } - if ($sign) { - if (!defined $keyid) { - $keyid = access_cfg('keyid','RETURN-UNDEF'); - } - my @tag_cmd = (@git, qw(tag -m), - "$package release $dversion for $csuite [dgit]"); - if ($dryrun != 1) { - push @tag_cmd, qw(-s); - push @tag_cmd, qw(-u),$keyid if defined $keyid; + + if (!$we_are_responder) { - if (!$dryrun) { ++ if ($dryrun <= 1) { + rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!"; + } else { + progress "[new .dsc left in $dscfn.tmp]"; } - push @tag_cmd, $tag; - runcmd_ordryrun_local @tag_cmd; - my @debsign_cmd = @debsign; - push @debsign_cmd, "-k$keyid" if defined $keyid; - push @debsign_cmd, $changesfile; - runcmd_ordryrun @debsign_cmd; } + + if ($we_are_responder) { - my $dryrunsuffix = $dryrun ? ".tmp" : ""; ++ my $dryrunsuffix = $dryrun > 1 ? ".tmp" : ""; + responder_receive_files('signed-dsc-changes', + "../$dscfn$dryrunsuffix", + "$changesfile$dryrunsuffix"); + } else { + sign_changes $changesfile; + } + runcmd_ordryrun @git, qw(push),access_giturl(),"refs/tags/$tag"; my $host = access_cfg('upload-host','RETURN-UNDEF'); my @hostarg = defined($host) ? ($host,) : (); @@@ -1723,10 -1275,10 +1730,13 @@@ sub parseopts () last if m/^--?$/; if (m/^--/) { if (m/^--dry-run$/) { ++ push @ropts, $_; + $dryrun=2; + } elsif (m/^--damp-run$/) { + push @ropts, $_; $dryrun=1; } elsif (m/^--no-sign$/) { + push @ropts, $_; $sign=0; } elsif (m/^--help$/) { cmd_help(); @@@ -1768,7 -1311,8 +1778,10 @@@ } else { while (m/^-./s) { if (s/^-n/-/) { - push @ropts, $_; ++ push @ropts, $&; + $dryrun=2; + } elsif (s/^-L/-/) { ++ push @ropts, $&; $dryrun=1; } elsif (s/^-h/-/) { cmd_help();