summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-10-09 07:21:45 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-10-09 07:21:45 +0100
commit4d1ab9278a03c2d00dd31ae150f9f77bfe581f18 (patch)
tree0b8af5ee50bd84b364d6f9d4b77449a3d11a6fa4 /dgit
parent20d213b07642bab55c3727532696623cb74ecee6 (diff)
wip changes for remote push - implement i_resp_*
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit27
1 files changed, 27 insertions, 0 deletions
diff --git a/dgit b/dgit
index b551eac..eb6f01d 100755
--- a/dgit
+++ b/dgit
@@ -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. ----------