diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-10-09 07:21:45 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-10-09 07:21:45 +0100 |
commit | 4d1ab9278a03c2d00dd31ae150f9f77bfe581f18 (patch) | |
tree | 0b8af5ee50bd84b364d6f9d4b77449a3d11a6fa4 | |
parent | 20d213b07642bab55c3727532696623cb74ecee6 (diff) |
wip changes for remote push - implement i_resp_*
-rw-r--r-- | TODO | 3 | ||||
-rwxr-xr-x | dgit | 27 |
2 files changed, 29 insertions, 1 deletions
@@ -1,4 +1,5 @@ -implement i_resp_* +implement i_localname_* +implement i_want_* --gpg= etc. @gpg should be in manual should pass @gpg to debsign @@ -1406,7 +1406,34 @@ sub cmd_rpush { }; i_cleanup(); die $@; +} + +sub i_resp_progress ($) { + my ($rhs) = @_; + my $msg = protocol_read_bytes \*RO, $rhs; + progress $msg; +} + +sub i_resp_complete { + i_cleanup(); + exit 0; +} + +sub i_resp_file ($) { + my ($keyword) = @_; + my $localname = i_method "i_localname_", $keyword; + my $localpath = "$i_tmp/$localname"; + stat $localpath and badproto \*RO, "file $keyword ($localpath) twice"; + protocol_receive_file \*RO, $localpath; +} + +sub i_resp_want ($) { + my ($keyword) = @_; + my @localpaths = i_method "i_want_", $keyword; + foreach my $localpath (@localpaths) { + protocol_send_file \*RI, $localpath; } + print RI "end-files\n" or die $!; } #---------- building etc. ---------- |