hooked up git-annex-shell transferinfo

Finally done with progressbars!
This commit is contained in:
Joey Hess 2012-09-21 23:25:06 -04:00
parent ee8789e9d7
commit c048add74d
6 changed files with 86 additions and 58 deletions

View file

@ -11,3 +11,5 @@ Please provide any additional information below.
I looked in the source code and found some hints that the rsync progress should actually be evaluated and shown, I'm opening a bug report for this reason.
[[!meta title="assistant: No progress bars for file uploads"]]
> now upload progress bars work! [[done]] --[[Joey]]

View file

@ -17,36 +17,14 @@ This is one of those potentially hidden but time consuming problems.
## uploads
Each individual remote type needs to implement its own support for calling
the ProgressCallback as the upload progresses.
* git: Done, with one exception: `git-annex-shell sendkey` runs `rsync
--server --sender` and in that mode it does not report progress info.
So downloads initiated by other repos do not show progress in the repo
doing the uploading.
Maybe I should
write a proxy for the rsync wire protocol that can tell what chunk of the
file is being sent, and shim it in front of the rsync server? Sadly,
the protocol is insane.
Another idea: Invert things. Make `git-annex-shell sendkey` run
`rsync -e 'cat'`, so it treats the incoming ssh connection as the server.
(cat probably won't really work; bidirectional pipe needed).
Run rsync in `--server` mode on the *client* side, piped to ssh.
Now the `git-annex` side doesn't have a progress bar (but it can poll the
file size and produce its own), `git-annex-shell` side does have a progress
bar.
Less crazy, but probably harder idea: Multiplex progress info from client
back to server over the ssh connection, and demultiplex at server end.
Or, use a separate ssh connection, and let ssh connection caching handle
the multiplexing.
the MeterUpdate callback as the upload progresses.
* git: **done**
* rsync: **done**
* directory: **done**
* web: Not applicable; does not upload
* S3
* bup
* S3: TODO
* bup: TODO
* hook: Would require the hook interface to somehow do this, which seems
too complicated. So skipping.

View file

@ -46,14 +46,14 @@ first "/~/" or "/~user/" is expanded to the specified home directory.
This runs rsync in server mode to transfer out the content of a key.
* transferinfo directory key uuid [file]
* transferinfo directory key
This is typically run at the same time as sendkey is sending a key
to the remote with the specified uuid.
to the remote. Using it is optional, but is used to update
progress information for the transfer of the key.
It reads lines from standard input, each giving the number of bytes
that have been received so far. This is optional, but is used to update
progress information for the transfer of the key.
that have been received so far.
* commit directory