chiark / gitweb /
wip remote - better debugging
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 Oct 2013 09:24:52 +0000 (10:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 Oct 2013 09:24:52 +0000 (10:24 +0100)
dgit

diff --git a/dgit b/dgit
index d287cfe742cde72567cb011e9d2262b84180b52a..b6d815870165667d72513da46194b0dea42c2dfc 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -226,6 +226,7 @@ sub protocol_receive_file ($$) {
        my $d = protocol_read_bytes \*STDIN, $1;
        print PF $d or die $!;
     }
+    printdebug "received into $ourfn\n";
 }
 
 #---------- remote protocol support, responder ----------
@@ -241,6 +242,7 @@ sub responder_send_command ($) {
 sub responder_send_file ($$) {
     my ($keyword, $ourfn) = @_;
     return unless $we_are_responder;
+    printdebug "[[ $keyword $ourfn\n";
     responder_send_command "file $keyword";
     protocol_send_file \*STDOUT, $ourfn;
 }
@@ -248,6 +250,7 @@ sub responder_send_file ($$) {
 sub responder_receive_files ($@) {
     my ($keyword, @ourfns) = @_;
     die unless $we_are_responder;
+    printdebug "]] $keyword @ourfns\n";
     responder_send_command "want $keyword";
     foreach my $fn (@ourfns) {
        protocol_receive_file \*STDIN, $fn;
@@ -1488,6 +1491,7 @@ sub i_resp_want ($) {
     my ($keyword) = @_;
     die "$keyword ?" if $i_wanted{$keyword}++;
     my @localpaths = i_method "i_want", $keyword;
+    printdebug "]]  $keyword @localpaths\n";
     foreach my $localpath (@localpaths) {
        protocol_send_file \*RI, $localpath;
     }