Commit graph

14159 commits

Author SHA1 Message Date
Joey Hess
39369365ec set preferred content expression 2013-10-06 13:03:02 -04:00
Joey Hess
336f4b5e2e mention preferred content standard 2013-10-06 13:02:17 -04:00
Joey Hess
a8b50f75b8 fix repo name 2013-10-06 12:59:48 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkC0W3ZQERUaTkHoks6k68Tsp1tz510nGo
2ed4087110 Added a comment: git annex copy not working 2013-10-06 10:18:10 +00:00
https://www.google.com/accounts/o8/id?id=AItOawkC0W3ZQERUaTkHoks6k68Tsp1tz510nGo
0ebc14267f Added a comment: git annex sync 2013-10-06 08:59:26 +00:00
http://edheil.wordpress.com/
848c398b97 Added a comment 2013-10-06 06:45:15 +00:00
https://www.google.com/accounts/o8/id?id=AItOawlkA6XinbeOdnEDxEGQUWyjqPGh0kdMXr4
a8bece239f 2013-10-06 05:02:52 +00:00
Joey Hess
feef7d3800 devblog 2013-10-05 17:26:17 -04:00
Joey Hess
635c9a1549 assistant: Detect stale git lock files at startup time, and remove them.
Extends the index.lock handling to other git lock files. I surveyed
all lock files used by git, and found more than I expected. All are
handled the same in git; it leaves them open while doing the operation,
possibly writing the new file content to the lock file, and then closes
them when done.

The gc.pid file is excluded because it won't affect the normal operation
of the assistant, and waiting for a gc to finish on startup wouldn't be
good.

All threads except the webapp thread wait on the new startup sanity checker
thread to complete, so they won't try to do things with git that fail
due to stale lock files. The webapp thread mostly avoids doing that kind of
thing itself. A few configurators might fail on lock files, but only if the
user is explicitly trying to run them. The webapp needs to start
immediately when the user has opened it, even if there are stale lock
files.

Arranging for the threads to wait on the startup sanity checker was a bit
of a bear. Have to get all the NotificationHandles set up before the
startup sanity checker runs, or they won't see its signal. Perhaps
the NotificationBroadcaster is not the best interface to have used for
this. Oh well, it works.

This commit was sponsored by Michael Jakl
2013-10-05 17:04:21 -04:00
Joey Hess
370dfd141b add dirContentsRecursiveSkipping 2013-10-05 15:36:09 -04:00
Joey Hess
6657aa8061 Merge branch 'master' of ssh://git-annex.branchable.com 2013-10-05 15:07:38 -04:00
Joey Hess
1be4d281d6 Better sanitization of problem characters when generating URL and WORM keys.
FAT has a lot of characters it does not allow in filenames, like ? and *
It's probably the worst offender, but other filesystems also have
limitiations.

In 2011, I made keyFile escape : to handle FAT, but missed the other
characters. It also turns out that when I did that, I was also living
dangerously; any existing keys that contained a : had their object
location change. Oops.

So, adding new characters to escape to keyFile is out. Well, it would be
possible to make keyFile behave differently on a per-filesystem basis, but
this would be a real nightmare to get right. Consider that a rsync special
remote uses keyFile to determine the filenames to use, and we don't know
the underlying filesystem on the rsync server..

Instead, I have gone for a solution that is backwards compatable and
simple. Its only downside is that already generated URL and WORM keys
might not be able to be stored on FAT or some other filesystem that
dislikes a character used in the key. (In this case, the user can just
migrate the problem keys to a checksumming backend. If this became a big
problem, fsck could be made to detect these and suggest a migration.)

Going forward, new keys that are created will escape all characters that
are likely to cause problems. And if some filesystem comes along that's
even worse than FAT (seems unlikely, but here it is 2013, and people are
still using FAT!), additional characters can be added to the set that are
escaped without difficulty.

(Also, made WORM limit the part of the filename that is embedded in the key,
to deal with filesystem filename length limits. This could have already
been a problem, but is more likely now, since the escaping of the filename
can make it longer.)

This commit was sponsored by Ian Downes
2013-10-05 15:01:49 -04:00
Joey Hess
3dac026598 move some code around 2013-10-05 13:49:45 -04:00
Joey Hess
9b746ee588 honor fileNameLengthLimit for quvi 2013-10-05 13:32:42 -04:00
Joey Hess
478eeea02e addurl: Better sanitization of generated filenames.
Use sanitizeFilePath rather than rolling our own sanitizer.
2013-10-05 13:30:13 -04:00
Joey Hess
cf428895a2 increase base upper bound
Android builds tested with very close to 4.8
2013-10-05 13:15:00 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnpdM9F8VbtQ_H5PaPMpGSxPe_d5L1eJ6w
1dccaeb8fe 2013-10-05 15:29:20 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnpdM9F8VbtQ_H5PaPMpGSxPe_d5L1eJ6w
3db1985a01 Added a comment 2013-10-05 10:45:16 +00:00
http://joeyh.name/
71dba0187a Added a comment 2013-10-04 20:50:34 +00:00
http://joeyh.name/
1537c21eb0 Added a comment 2013-10-04 20:17:07 +00:00
http://joeyh.name/
cd31d53e96 Added a comment 2013-10-04 20:13:37 +00:00
Joey Hess
49ccf56d55 add back 2013-10-04 13:09:36 -04:00
Joey Hess
3d5fe9b794 add news item for git-annex 4.20131002 2013-10-04 13:09:23 -04:00
Joey Hess
99e5f52e7f add news item for git-annex 4.20131003 2013-10-04 13:07:52 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnpdM9F8VbtQ_H5PaPMpGSxPe_d5L1eJ6w
13f776140d 2013-10-04 14:41:05 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnpdM9F8VbtQ_H5PaPMpGSxPe_d5L1eJ6w
f0ec3d355a 2013-10-04 14:39:15 +00:00
http://cstork.org/
7b7d4b2353 Added a comment 2013-10-04 11:17:42 +00:00
http://cstork.org/
c5ef652a4d Added a comment: How should this interact with the trust model and location tracking? 2013-10-04 11:13:11 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnyMzZZLS1xGW1raqc_9Md6Ksdkvx5rUJU
5a330fe6c8 Added a comment 2013-10-04 10:59:30 +00:00
http://cstork.org/
0d14285585 Added a comment: News page not updated 2013-10-04 09:38:21 +00:00
http://olivier.mehani.name/
fe52de18b5 Added a comment 2013-10-04 05:14:16 +00:00
Joey Hess
891242ad26 another lock file 2013-10-03 17:05:53 -04:00
Joey Hess
f4d984e3cc wording 2013-10-03 17:00:45 -04:00
Joey Hess
d822b7a3dd link 2013-10-03 17:00:04 -04:00
Joey Hess
ece27f184d devblog 2013-10-03 16:58:40 -04:00
Joey Hess
93dbb7842e watcher: Detect at startup time when there is a stale .git/lock, and remove it so it does not interfere with the automatic commits of changed files. 2013-10-03 16:57:21 -04:00
Joey Hess
f8880c4fe4 Automatically and safely detect and recover from dangling .git/annex/index.lock files, which would prevent git from committing to the git-annex branch, eg after a crash. 2013-10-03 15:43:08 -04:00
Joey Hess
83b4b8d589 rename confusing function
The index.lck file is not a lock file. Kept the historical name for now as
changing it would be work.
2013-10-03 15:06:58 -04:00
Joey Hess
f2ee4ef86d ensure that commitBranch is only called when the journal is locked
This is not strictly a requirement, since it does not actually update the
journal. But it's a nice invariant to enforce.
2013-10-03 14:48:46 -04:00
Joey Hess
56c3f68a53 use types to partially prove correctness of journal locking code
My implementation does not guard against double locking of the journal. But
it does ensure that the journal is always locked when operated on, by using
a type that is only produced by lockJournal, and which is required as a
parameter of all functions that operate on the journal.

Note that I had to add the fooStale functions for cases where it does not
make sense to lock the journal when querying it. I was more concerned about
ensuring that anything that modifies the journal is locked.
setJournalFile's implementation ensures that any query of the journal will
get one value or the other atomically, even if the journal is being changed
at the time.
2013-10-03 14:41:57 -04:00
Joey Hess
7a9a16b337 lockJournal when running performTransitions
This may not strictly be needed -- the transition code bypasses the
journal. However, this ensures that the git-annex branch is only
committed with the journal locked. This will allow for further
improvements.
2013-10-03 14:37:46 -04:00
Joey Hess
be0b7341b4 Merge branch 'master' of ssh://git-annex.branchable.com 2013-10-03 12:34:27 -04:00
Joey Hess
20fb905bb6 allow building w/o cryptohash
Mostly for the debian stable autobuilds, which have a too old version
to use the Crypto.Hash module.
2013-10-03 12:33:38 -04:00
Joey Hess
c34948247e quash warning 2013-10-03 12:33:31 -04:00
https://www.google.com/accounts/o8/id?id=AItOawmf-gdwX6Nk3DyHyVCh3C_e8VGcAnPbMCI
05db0fef17 2013-10-03 13:02:40 +00:00
Joey Hess
3ac9c4e672 hlint 2013-10-02 22:59:07 -04:00
Joey Hess
f25991ca33 fix windows build 2013-10-02 20:33:13 -04:00
Joey Hess
f1295b5141 fix windows build 2013-10-02 20:26:00 -04:00
http://joeyh.name/
0724bf0d90 Added a comment 2013-10-03 00:06:11 +00:00
https://www.google.com/accounts/o8/id?id=AItOawlkA6XinbeOdnEDxEGQUWyjqPGh0kdMXr4
5cfa8f5b78 Added a comment: Starting git-annex assistant 2013-10-02 23:57:49 +00:00