Commit graph

4201 commits

Author SHA1 Message Date
Nathan Collins
f5261f60c3 Make standalone man-page installation possible
The `cabal install git-annex` doesn't install the man pages, and the
Makefile only installed the man pages as part of a full build/install.
So, I factored out the documentation parts of the Makefile.
2012-06-05 20:36:42 -07:00
Joey Hess
d41c1134cb daily blog 2012-06-05 20:54:56 -04:00
Joey Hess
d05a22b5f6 closed a race, although a less likely similar one remains 2012-06-05 20:34:25 -04:00
Joey Hess
a7a729bce4 Merge branch 'master' into watch 2012-06-05 20:30:37 -04:00
Joey Hess
c981ccc077 add: Prevent (most) modifications from being made to a file while it is being added to the annex.
Anything that tries to open the file for write, or delete the file,
or replace it with something else, will not affect the add.

Only if a process has the file open for write before add starts
can it still change it while (or after) it's added to the annex.
(fsck will catch this later of course)
2012-06-05 20:28:34 -04:00
Joey Hess
5809f33f8b use createAnnexDirectory when setting up tmp dir 2012-06-05 20:25:32 -04:00
Joey Hess
f8d422fe24 update test suite 2012-06-05 19:54:44 -04:00
Joey Hess
d3cee987ca separate source of content from the filename associated with the key when generating a key
This already made migrate's code a lot simpler.
2012-06-05 19:51:03 -04:00
Joey Hess
e6b157cc09 Merge branch 'master' into watch 2012-06-05 19:03:44 -04:00
Joey Hess
77188ff04d update 2012-06-05 19:03:39 -04:00
Joey Hess
f93fbf9c76 Merge branch 'master' into watch 2012-06-05 18:54:31 -04:00
Joey Hess
b5c617b623 one more 2012-06-05 18:54:25 -04:00
Joey Hess
4f25721bdf Merge branch 'master' into watch
Conflicts:
	doc/design/assistant/inotify.mdwn
2012-06-05 18:39:32 -04:00
Joey Hess
40456953c2 another one 2012-06-05 15:20:13 -04:00
Joey Hess
a50d1b5853 Merge branch 'master' of ssh://git-annex.branchable.com
Conflicts:
	doc/design/assistant/inotify.mdwn
2012-06-05 15:14:32 -04:00
Joey Hess
0eec65c815 races 2012-06-05 15:10:04 -04:00
Joey Hess
73ab0e642c races 2012-06-05 15:06:12 -04:00
Joey Hess
78f5f90c24 Merge branch 'master' into watch 2012-06-05 14:53:38 -04:00
Joey Hess
e771c64559 races 2012-06-05 14:53:30 -04:00
Joey Hess
1ab7b2b8ea add news item for git-annex 3.20120605 2012-06-05 14:15:00 -04:00
Joey Hess
8511957c68 releasing version 3.20120605 2012-06-05 14:14:45 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus
a71b09a4fe Added a comment 2012-06-05 14:07:27 +00:00
Joey Hess
13118136c0 Preserve parent environment when running hooks of the hook special remote. 2012-06-04 21:52:36 -04:00
Joey Hess
b86825e42b update 2012-06-04 21:29:26 -04:00
Joey Hess
cbdaccd44a run event handlers all in the same Annex monad
Uses a MVar again, as there seems no other way to thread the state through
inotify events.

This is a rather unsatisfactory result. I had wanted to run them in
the same monad so that the git queue could be used to coleasce git commands
and speed things up. But, that led to fragility: If several files are
added, and one is removed before queue flush, git add will fail to add
any of them. So, the queue is still explicitly flushed after each add for
now.

TODO: Investigate using git add --ignore-errors. This would need to be done
in Command.Add. And, git add still exits nonzero with it, so would need
to avoid crashing on queue flush.
2012-06-04 21:21:52 -04:00
Joey Hess
48efa2d2d3 avoid explicit queue flush
The queue is still flushed on add, because each add event is handled by a
separate Annex monad. That needs to be fixed to speed up add a lot.
2012-06-04 20:44:15 -04:00
Joey Hess
7a6fb8ae4e flush the git queue when a new type of action is being added to it
This allows the queue to be used in a single process for multiple possibly
conflicting commands, like add and rm, without running them out of order.

This assumes that running the same git subcommand with different parameters
cannot itself conflict.
2012-06-04 20:41:22 -04:00
Joey Hess
bd7857d903 ignore-unmatch when removing a staged file
When a file is added, and then deleted before the add action runs,
the delete event was unhappy that the file never did get staged.
2012-06-04 20:13:25 -04:00
Joey Hess
cbf16f1967 refactor 2012-06-04 19:43:29 -04:00
Joey Hess
b1619fbd0b header 2012-06-04 19:04:55 -04:00
Joey Hess
2b0e65a0ad Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-04 18:17:43 -04:00
Joey Hess
b51520b0d5 update 2012-06-04 18:16:18 -04:00
Joey Hess
ec98581112 notice deleted files on startup 2012-06-04 18:14:42 -04:00
Joey Hess
5b4e5ce7e5 deletion
When a new file is annexed, a deletion event occurs when it's moved away
to be replaced by a symlink. Most of the time, there is no problimatic
race, because the same thread runs the add event as the deletion event.
So, once the symlink is in place, the deletion code won't run at all,
due to existing checks that a deleted file is really gone.

But there is a race at startup, as then the inotify thread is running
at the same time as the main thread, which does the initial tree walking
and annexing. It would be possible for the deletion inotify to run
in a perfect race with the addition, and remove the newly added symlink
from the git cache.

To solve this race, added event serialization via a MVar. We putMVar
before running each event, which blocks if an event is already running.
And when an event finishes (or crashes!), we takeMVar to free the lock.

Also, make rm -rf not spew warnings by passing --ignore-unmatch when
deleting directories.
2012-06-04 18:09:18 -04:00
Joey Hess
659e6b1324 suppress "recording state in git" message during add 2012-06-04 17:18:54 -04:00
Joey Hess
529a3721e1 refactor 2012-06-04 17:17:05 -04:00
Joey Hess
ce9dc15ea0 Merge branch 'master' into watch 2012-06-04 17:07:25 -04:00
https://www.google.com/accounts/o8/id?id=AItOawlu7K3h7Ry1uDAU_ERYGuqt0LoGNJqGuRo
88107724d7 Added a comment 2012-06-04 21:01:52 +00:00
Joey Hess
e43e513414 typo 2012-06-04 16:16:50 -04:00
Joey Hess
52e31dbd89 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-04 16:16:49 -04:00
http://joeyh.name/
fc66d64205 Added a comment 2012-06-04 20:02:23 +00:00
http://joeyh.name/
04ddceece0 Added a comment 2012-06-04 19:56:05 +00:00
http://joeyh.name/
db2e6c8239 Added a comment: This is not an easy question to answer... 2012-06-04 19:49:46 +00:00
Joey Hess
39fb9db043 add 2012-06-04 15:47:19 -04:00
http://joeyh.name/
02dce20325 Added a comment 2012-06-04 19:46:04 +00:00
http://joeyh.name/
ecac13a113 Added a comment 2012-06-04 19:45:00 +00:00
Joey Hess
c9d3a238cf Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-04 15:42:48 -04:00
Joey Hess
d08274a941 move 2012-06-04 15:42:26 -04:00
http://ciffer.net/~svend/
dfb3182877 Added a comment 2012-06-04 19:42:08 +00:00
http://ciffer.net/~svend/
e33f6bdfde removed 2012-06-04 19:40:57 +00:00