diff options
| -rw-r--r-- | xmake/modules/private/service/remote_build/client.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua index 12cfb7a30..bd0938a4c 100644 --- a/xmake/modules/private/service/remote_build/client.lua +++ b/xmake/modules/private/service/remote_build/client.lua @@ -421,16 +421,27 @@ end -- send diff files function remote_build_client:_send_diff_files(stream, diff_files) + local count = 0 + local totalsize = 0 for _, fileitem in ipairs(diff_files.inserted) do - if not stream:send_file(fileitem, {compress = os.filesize(fileitem) > 4096}) then + local filesize = os.filesize(fileitem) + vprint("sending %s, %d bytes ..", fileitem, filesize) + if not stream:send_file(fileitem, {compress = filesize > 4096}) then return false end + count = count + 1 + totalsize = totalsize + filesize end for _, fileitem in ipairs(diff_files.modified) do - if not stream:send_file(fileitem, {compress = os.filesize(fileitem) > 4096}) then + local filesize = os.filesize(fileitem) + vprint("sending %s, %d bytes ..", fileitem, filesize) + if not stream:send_file(fileitem, {compress = filesize > 4096}) then return false end + count = count + 1 + totalsize = totalsize + filesize end + cprint("${bright}%d${clear} files, ${bright}%d${clear} bytes are uploaded.", count, totalsize) return stream:flush() end |
