Commit graph

58 commits

Author SHA1 Message Date
Joey Hess
0c0fd0c54c update 2012-07-02 13:49:27 -04:00
Joey Hess
8f6c2e6081 fix reading of empty filename from transfer info file 2012-07-02 11:02:47 -04:00
Joey Hess
9517fbb948 cleanup 2012-07-02 08:35:15 -04:00
Joey Hess
bea0ac0274 record transfers for git-annex-shell
Not yet tested and places git-annex-shell is run need to be modified to
pass the new field settings.

Note that rsyncServerSend was changed to fork, rather than directly exec
rsync, because it needs to keep the transfer lock held, and clean up the
transfer log when done.
2012-07-02 01:31:10 -04:00
Joey Hess
7225c2bfc0 record transfer information on local git remotes
In order to record a semi-useful filename associated with the key,
this required plumbing the filename all the way through to the remotes'
storeKey and retrieveKeyFile.

Note that there is potential for deadlock here, narrowly avoided.
Suppose the repos are A and B. A sends file foo to B, and at the same
time, B gets file foo from A. So, A locks its upload transfer info file,
and then locks B's download transfer info file. At the same time,
B is taking the two locks in the opposite order. This is only not a
deadlock because the lock code does not wait, and aborts. So one of A or
B's transfers will be aborted and the other transfer will continue.
Whew!
2012-07-01 17:15:11 -04:00
Joey Hess
8c10f37714 bugfixes
fdToHandle seems to close the fd

avoid excess trailing newline
2012-07-01 17:15:11 -04:00
Joey Hess
72988bae34 tested; bugfixes 2012-07-01 17:15:11 -04:00
Joey Hess
be0e38bcc3 add transfer information files 2012-07-01 17:15:11 -04:00