From: Ian Jackson Date: Wed, 9 Oct 2013 06:49:34 +0000 (+0100) Subject: wip changes for remote push - split off sign_changes X-Git-Tag: debian/0.16_experimental2^2~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=25f567819dab569d2f9bbe31626f32197b799e7d wip changes for remote push - split off sign_changes --- diff --git a/dgit b/dgit index 83bed540..9d2d8769 100755 --- a/dgit +++ b/dgit @@ -1127,6 +1127,16 @@ END return ($tagobjfn); } +sub sign_changes ($) { + my ($changesfile) = @_; + if ($sign) { + my @debsign_cmd = @debsign; + push @debsign_cmd, "-k$keyid" if defined $keyid; + push @debsign_cmd, $changesfile; + runcmd_ordryrun @debsign_cmd; + } +} + sub dopush () { print DEBUG "actually entering push\n"; prep_ud(); @@ -1222,19 +1232,15 @@ sub dopush () { } } - if ($sign) { - if ($we_are_responder) { - my $dryrunsuffix = $dryrun ? ".tmp" : ""; - responder_receive_files('signed-changes-dsc', - "$changesfile$dryrunsuffix", - "../$dscfn$dryrunsuffix"); - } else { - 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" : ""; + responder_receive_files('signed-dsc-changes', + "../$dscfn$dryrunsuffix", + "$changesfile$dryrupnsuffix"); + } 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,) : ();