Commit graph

24064 commits

Author SHA1 Message Date
Joey Hess
b1b684d5c9 Merge branch 'master' of ssh://git-annex.branchable.com 2015-05-19 15:44:41 -04:00
Joey Hess
846e7db245 unused imports 2015-05-19 15:05:30 -04:00
Joey Hess
167539a354 better memoize core.sharedrepository handling
It was memoized, but that was not used consistently. Move it to
Types.GitConfig so it will auto-memoize.
2015-05-19 15:04:24 -04:00
Joey Hess
b47c9fd587 honor core.sharedRepository settings in lockContent
The content file may not be owned by the user running git-annex, in which
case, setting the owner write bit was not enough to let lockContent
act on the file. However, with some core.sharedRepository configs, the file
should be writable by the user's group. So, the thing to do is to call
thawContent on it.
2015-05-19 14:53:19 -04:00
Joey Hess
c0cc22a657 document exit codes of inannex 2015-05-19 14:35:56 -04:00
Joey Hess
f4e2093760 fix inAnnexSafe result for direct file that is being dropped
It was returning Just False in this situation, which differed from indirect
mode behavior. I don't think this led to any actual problems; things that
checked if the file being dropped was present just failed to fail, and
instead reported it wasn't present, possibly incorrectly.

Hmm, it's possible that this could have made git annex fsck --from remote
update the location log wrongly, if a remote was in direct mode, and was in
the middle of trying to drop a key, and the drop later failed.
2015-05-19 14:26:07 -04:00
Joey Hess
1312e721ed convert lockContent to use new LockPools
Also cleaned up the code, avoiding creating a lock file if we're going to
open it for create later anyway.

And, if there's an exception while preparing to lock the file, but not at
the point of actually taking the lock, throw an exception, instead of
silently not locking and pretending to succeed.

And, on Windows, always use lock file, even if the repo somehow got into
indirect mode (maybe with cygwin git..)
2015-05-19 14:12:23 -04:00
Joey Hess
ecb0d5c087 use lock pools throughout git-annex
The one exception is in Utility.Daemon. As long as a process only
daemonizes once, which seems reasonable, and as long as it avoids calling
checkDaemon once it's already running as a daemon, the fcntl locking
gotchas won't be a problem there.

Annex.LockFile has it's own separate lock pool layer, which has been
renamed to LockCache. This is a persistent cache of locks that persist
until closed.

This is not quite done; lockContent stil needs to be converted.
2015-05-19 14:09:52 -04:00
https://id.koumbit.net/anarcat
876ff5e1be Added a comment 2015-05-19 12:18:06 +00:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
99981f7905 2015-05-19 11:48:43 +00:00
Marco
eaf72fe7cf Added a comment: A possible solution 2015-05-19 11:03:22 +00:00
https://me.yahoo.com/a/bBy7WkgQicYHIiiyj.Vm0TcMbxi2quzbPFef#6f9f7
b8a420b7f9 Added a comment: Convert bare repository to normal 2015-05-19 09:17:15 +00:00
Joey Hess
6915b71c57 lock pools to work around non-concurrency/composition safety of POSIX fcntl 2015-05-18 15:57:17 -04:00
Joey Hess
af6b313456 Merge branch 'master' of ssh://git-annex.branchable.com 2015-05-17 17:27:24 -04:00
Joey Hess
6ec7c4fef4 webapp: Fix zombie xdg-open process left when opening file browser. Closes: #785498 2015-05-17 17:26:19 -04:00
Joey Hess
e9172263e5 comment typos 2015-05-17 14:22:14 -04:00
https://id.koumbit.net/anarcat
2553b4e3da fix links 2015-05-16 21:48:03 +00:00
https://id.koumbit.net/anarcat
3677a1577e Added a comment 2015-05-16 21:46:20 +00:00
https://id.koumbit.net/anarcat
6d1e598818 finally open that discussion directly 2015-05-16 21:45:36 +00:00
Joey Hess
67c9123fe8 twitter search seems to be too broken to include a feed from it anymore
The search seems to only find spammy tweets. I know people talk about
git-anenx on twitter, but it seems twitter's search does not find those
interesting conversations.
2015-05-16 15:41:12 -04:00
http://joeyh.name/
7ed76b6a07 Added a comment 2015-05-16 18:35:22 +00:00
Joey Hess
273453d1bc Merge branch 'master' of ssh://git-annex.branchable.com 2015-05-16 14:18:57 -04:00
Joey Hess
7f810c110f nasty issue with fcntl locks 2015-05-16 13:23:43 -04:00
Marco
0e1e48c124 Added a comment: Disaster recovery 2015-05-15 09:40:16 +00:00
Marco
aa1889444a Added a comment: git annex repair --force 2015-05-15 08:01:25 +00:00
Marco
6bc8845e57 2015-05-15 05:39:27 +00:00
cehteh
0933c6ddf1 2015-05-15 01:27:13 +00:00
anarcat
1acfb29d3c Added a comment: mailing lists and support sites 2015-05-14 20:26:59 +00:00
anarcat
b69dbf725c json missing some output? 2015-05-14 20:16:42 +00:00
Joey Hess
d505485b2d devblog 2015-05-14 15:56:56 -04:00
Joey Hess
b284cefccc fix type in the name of --used-refspec in changelog 2015-05-14 15:46:01 -04:00
Joey Hess
823bb8031b add annex.used-refspec 2015-05-14 15:44:08 -04:00
Joey Hess
86699ff861 unused: Add --used option, which can specify a set of refs to consider used, rather than the default of considering all refs used. 2015-05-14 15:31:38 -04:00
Joey Hess
a2fd8be337 adjust fast build so that ./ghci works with ghc 7.8.4 2015-05-14 14:47:53 -04:00
Joey Hess
5fea6dcab2 more formal spec 2015-05-14 13:11:18 -04:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
b04e589ff3 Added a comment 2015-05-14 16:17:08 +00:00
anarcat
9519bca993 Added a comment: confirmed 2015-05-14 15:50:33 +00:00
https://me.yahoo.com/a/StKYI.ZuofVB3xNCCzjJo.V7Fg--#11600
d708a55c68 Added a comment 2015-05-14 09:31:09 +00:00
skew
0d62a4a5d7 Added a comment: transcript 2015-05-14 04:37:33 +00:00
Joey Hess
48374c67eb response 2015-05-13 11:53:22 -04:00
Joey Hess
99fe624e2f design 2015-05-13 11:30:41 -04:00
Joey Hess
e210a81d9f update 2015-05-12 20:17:30 -04:00
Joey Hess
7ebf234616 Stale transfer lock and info files will be cleaned up automatically when get/unused/info commands are run.
Deleting lock files is tricky, tricky stuff. I think I got it right!
2015-05-12 20:11:23 -04:00
Joey Hess
7299bbb639 don't clean up transfer lock file when retrying transfer
This affected callers that used forwardRetry; if the 1st attempt failed it
would clean up the transfer lock before retrying.
2015-05-12 19:43:24 -04:00
Joey Hess
8c2dd7d8ee Fix an unlikely race that could result in two transfers of the same key running at once.
As discussed in bug report.
2015-05-12 19:39:28 -04:00
Joey Hess
e25ecab7dd convert to using Utility.Lockfile for transfer lock files
Should be no behavior changes, just simplified code.

The only actual difference is it doesn't truncate the lock file.
I think that was a holdover from when transfer info was written to the lock
file.
2015-05-12 19:36:16 -04:00
Joey Hess
643b233860 an optimization that also fixes a reversion
This is a little optimisation; avoid loading the info file for the
download of the current key when checking for other downloads.

The reversion it fixes is sorta strange.
a812d598ef broke checking for transfers
that were already in progress. Indeed, the transfer lock was not held
after getTransfers was called.

Why? I think it's magic in ghc's handling of getLock and setLock,
although it's hard to tell since those functions are almost entirely
undocumented as to their semantics.

Something, either the RTS (or maybe it's linux?) notices that the
same process has taken a lock and is now calling getLock on a FD attached
to the same file. So, it drops the lock.

So, this optimisation avoids that problematic behavior.
2015-05-12 18:34:49 -04:00
Joey Hess
1fd54e986a devblog 2015-05-12 16:36:39 -04:00
Joey Hess
61ccf95004 Avoid accumulating transfer failure log files unless the assistant is being used.
Only the assistant uses these, and only the assistant cleans them up, so
make only git annex transferkeys write them,

There is one behavior change from this. If glacier is being used, and a
manual git annex get --from glacier fails because the file isn't available
yet, the assistant will no longer later see that failed transfer file and
retry the get. Hope no-one depended on that old behavior.
2015-05-12 15:53:38 -04:00
Joey Hess
a812d598ef Take space that will be used by running downloads into account when checking annex.diskreserve. 2015-05-12 15:20:22 -04:00