Commit graph

4267 commits

Author SHA1 Message Date
Joey Hess
c9d7e9f6bd startedTime needs to be a Maybe to handle transfers that have not started yet
This changes the file format.
2012-07-02 16:06:52 -04:00
Joey Hess
3ea708e03b Merge branch 'master' into assistant 2012-07-02 15:45:20 -04:00
Joey Hess
0c0fd0c54c update 2012-07-02 13:49:27 -04:00
Joey Hess
7daa269853 better pid file locking code 2012-07-02 13:47:32 -04:00
Joey Hess
bdcabb3cfa fix associatedfile sanity check
It seems best to require that the file just be relative, and not some ../ trick.

git-annex-shell sendkey and recvkey both update transfer information now
2012-07-02 11:10:17 -04:00
Joey Hess
8f6c2e6081 fix reading of empty filename from transfer info file 2012-07-02 11:02:47 -04:00
Joey Hess
760e028dca pass associatedfile and remoteuuid to git-annex-shell
This *almost* works.

Along the way, I noticed that the --uuid parameter was being accidentially
passed after the --, so that has never been actually used by
git-annex-shell to verify it's running in the expected repository. Oops. Fixed.
2012-07-02 10:57:51 -04:00
Joey Hess
74f0d67aa3 avoid untrappable exception if dirContentsRecursive is run on a directory
that doesn't exist, or cannot be read

The problem is its use of unsafeInterleaveIO, which causes its IO code
to run when the thunk is forced, outside any exception trapping the caller
may do.
2012-07-02 10:56:26 -04:00
Joey Hess
9517fbb948 cleanup 2012-07-02 08:35:15 -04:00
Joey Hess
bab6dc48d3 official Fedora builds now available for F16, F17 2012-07-02 07:51:55 -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
d1f49b0ad0 add fields to git-annex-shell 2012-07-02 00:53:00 -04:00
Joey Hess
7625319c2c Merge branch 'master' into assistant 2012-07-01 21:00:43 -04:00
Joey Hess
2d2bfe9809 reorg 2012-07-01 20:55:20 -04:00
Joey Hess
c53da2b04a blog for the day 2012-07-01 17:15:11 -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
e5fd8b67b7 get, move, copy: Now refuse to do anything when the requested file transfer is already in progress by another process.
Note this is per-remote, so trying to get the same file from multiple
remotes can still let duplicate downloads run. (And uploading the same file
to multiple remotes is not duplicate at all of course.)

get, move, and copy are the only git-annex subcommands that transfer
files, but there's still git-annex-shell recvkey and sendkey to deal with too.

I considered modifying retrieveKeyFile or getViaTmp, but they are called
by other code that does not involve expensive file transfers (migrate)
or that does file transfers that should not be checked by this (fsck --from).
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
https://www.google.com/accounts/o8/id?id=AItOawnHrjHxJAm39x8DR4bnbazQO6H0nMNuY9c
edee8ad05b Added a comment: gnu commands 2012-07-01 17:03:58 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnHrjHxJAm39x8DR4bnbazQO6H0nMNuY9c
768036f3dd Added a comment: sha256 alternative 2012-06-30 14:34:12 +00:00
Philipp Kern
49136c22d0 doc/download.mdwn: document no-s3 and assistant branches 2012-06-30 15:00:00 +02:00
Joey Hess
660f81d2b2 blog for the day 2012-06-29 15:44:14 -04:00
Joey Hess
c79625290a improving transfer data types and design 2012-06-29 14:12:16 -04:00
Joey Hess
0ed7db5f3a add news item for git-annex 3.20120629 2012-06-29 14:03:37 -04:00
Joey Hess
61786c52ad releasing version 3.20120629 2012-06-29 14:03:03 -04:00
Joey Hess
26208b93e5 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-29 12:55:39 -04:00
Joey Hess
e7182ad119 further design 2012-06-29 11:59:25 -04:00
Joey Hess
29335bf326 pointlessness 2012-06-29 10:00:05 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
6b84f23317 Added a comment 2012-06-29 12:02:49 +00:00
Joey Hess
397117429c simplify
modifyMVar_ catches exceptions, so no need to roll my own
2012-06-28 23:40:16 -04:00
Joey Hess
247099f628 refactor 2012-06-28 20:01:03 -04:00
Joey Hess
cd0ab91c91 blog for the day 2012-06-28 18:23:48 -04:00
Joey Hess
39569e889a blog for the day 2012-06-28 18:22:43 -04:00
Joey Hess
c7328556a3 update 2012-06-28 14:48:46 -04:00
Joey Hess
638a321ca5 typo 2012-06-28 14:15:49 -04:00
Joey Hess
421f9ce0e2 fix kqueue build 2012-06-28 14:13:15 -04:00
Joey Hess
6cc3eb97db update 2012-06-28 14:06:22 -04:00
Joey Hess
343ecf999a post my current set of ideas for handling unlocking 2012-06-28 14:00:25 -04:00
Joey Hess
a3636602ab MVar deadlock problem seems to be fixed by previous commit 2012-06-28 13:47:15 -04:00
Joey Hess
4888c5b042 improve thread termination handling
The reason the DirWatcher had to wait for program termination was because
it used withINotify, so when it finished, its watcher threads were killed.
But since I have two DirWatcher threads now, that was not good, and could
perhaps explain the MVar problem I saw yesterday. In any case, fixed this
part of the code by making the DirWatcher return a handle that can be used
to stop it, and now the main Assistant thread is the only one calling
waitForTermination.
2012-06-28 13:37:03 -04:00
Joey Hess
40f357fdcf tweak 2012-06-28 13:04:02 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
e4596a133e Added a comment 2012-06-28 13:39:19 +00:00
https://www.google.com/accounts/o8/id?id=AItOawmURXBzaYE1gmVc-X9eLAyDat_6rHPl670
b2327f04c6 2012-06-28 12:37:29 +00:00
Joey Hess
1f09ae686e update 2012-06-27 21:11:39 -04:00
Joey Hess
fb51d99951 merge conflict resolution now working
Avoid MVar deadlock issue, which I don't understand.
Have not taken the time to debug it fully, because it turns out I don't
need to resolve merge conflicts when a new branch ref is written... I
think.

Ensure the git-annex branch is merged when doing a manual pull.
Otherwise it can get out of sync, since git-annex normally only merges it
once per run.
2012-06-27 20:50:50 -04:00
Joey Hess
59b5266ad1 actually fetch from remote when doing a manual pull
forgot to do this
2012-06-27 20:30:04 -04:00
Joey Hess
783bee285f automatic conflict resolution for assistant 2012-06-27 20:06:21 -04:00
Joey Hess
2e501364d4 Merge branch 'master' into assistant 2012-06-27 18:09:11 -04:00