From 405e5ca7a821ac385b5da78613f6048be1aaadc5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 23 Oct 2013 11:34:28 +0100 Subject: remote fixes --- dgit | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/dgit b/dgit index 5ea9c26..7052bf1 100755 --- a/dgit +++ b/dgit @@ -1268,13 +1268,18 @@ sub dopush () { responder_send_command("param head $head"); 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, - "../$dscfn", - $changesfile,$changesfile, - $tfn); + my $tagobjfn; + + if ($we_are_responder) { + $tagobjfn = $tfn->('.signed.tmp'); + responder_receive_files('signed-tag', $tagobjfn); + } else { + $tagobjfn = + push_mktag($head,$clogp,$tag, + "../$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; @@ -1546,7 +1551,7 @@ sub i_resp_want ($) { foreach my $localpath (@localpaths) { protocol_send_file \*RI, $localpath; } - print RI "end-files\n" or die $!; + print RI "files-end\n" or die $!; } our ($i_clogp, $i_version, $i_tag, $i_dscfn); @@ -1562,19 +1567,20 @@ sub i_localname_dsc { sub i_want_signed_tag { printdebug Dumper(\%i_param, $i_dscfn); - defined $i_param{'head'} && defined $i_dscfn + defined $i_param{'head'} && defined $i_dscfn && defined $i_clogp or badproto \*RO, "sequencing error"; my $head = $i_param{'head'}; die if $head =~ m/[^0-9a-f]/ || $head !~ m/^../; - push_parse_dsc $i_dscfn, 'remote dsc', + push_parse_dsc $i_dscfn, 'remote dsc', $i_version; - push_mktag $head, $i_clogp, $i_tag, - $i_dscfn, - 'remote.changes', 'remote changes', - 'tag.tag'; + my $tagobjfn = + push_mktag $head, $i_clogp, $i_tag, + $i_dscfn, + 'remote.changes', 'remote changes', + sub { "tag$_[0]"; }; - return 'tag.tag'; + return $tagobjfn; } sub i_want_signed_dsc_changes { -- cgit v1.2.3