Commit graph

11171 commits

Author SHA1 Message Date
http://joeyh.name/
59407ddc43 Added a comment 2013-05-19 19:46:14 +00:00
http://joeyh.name/
977bc4da51 Added a comment 2013-05-19 19:35:51 +00:00
http://me.tinco.nl/
95ff77ebef Added a comment 2013-05-19 19:27:03 +00:00
http://joeyh.name/
328c38d472 Added a comment 2013-05-19 19:12:59 +00:00
Joey Hess
6d7d5f1be9 close 2013-05-19 15:10:08 -04:00
http://joeyh.name/
3db2dceaa1 Added a comment 2013-05-19 18:50:07 +00:00
Joey Hess
21d5489bd3 typo 2013-05-19 14:46:48 -04:00
GLITTAH
63777dfb1b 2013-05-19 18:43:59 +00:00
GLITTAH
3460119a31 2013-05-19 18:41:34 +00:00
Joey Hess
7eb6af07b9 Merge branch 'master' of ssh://git-annex.branchable.com 2013-05-19 14:25:08 -04:00
Joey Hess
345ee4f37c Switch to MonadCatchIO-transformers for better handling of state while catching exceptions.
As seen in this bug report, the lifted exception handling using the StateT
monad throws away state changes when an action throws an exception.
http://git-annex.branchable.com/bugs/git_annex_fork_bombs_on_gpg_file/
  .. Which can result in cached values being redundantly calculated, or other
     possibly worse bugs when the annex state gets out of sync with reality.

This switches from a StateT AnnexState to a ReaderT (MVar AnnexState).
All changes to the state go via the MVar. So when an Annex action is
running inside an exception handler, and it makes some changes, they
immediately go into affect in the MVar. If it then throws an exception
(or even crashes its thread!), the state changes are still in effect.

The MonadCatchIO-transformers change is actually only incidental.
I could have kept on using lifted-base for the exception handling.
However, I'd have needed to write a new instance of MonadBaseControl
for the new monad.. and I didn't write the old instance.. I begged Bas
and he kindly sent it to me. Happily, MonadCatchIO-transformers is
able to derive a MonadCatchIO instance for my monad.

This is a deep level change. It passes the test suite! What could it break?

Well.. The most likely breakage would be to code that runs an Annex action
in an exception handler, and *wants* state changes to be thrown away.
Perhaps the state changes leaves the state inconsistent, or wrong. Since
there are relatively few places in git-annex that catch exceptions in the
Annex monad, and the AnnexState is generally just used to cache calculated
data, this is unlikely to be a problem.

Oh yeah, this change also makes Assistant.Types.ThreadedMonad a bit
redundant. It's now entirely possible to run concurrent Annex actions in
different threads, all sharing access to the same state! The ThreadedMonad
just adds some extra work on top of that, with its own MVar, and avoids
such actions possibly stepping on one-another's toes. I have not gotten
rid of it, but might try that later. Being able to run concurrent Annex
actions would simplify parts of the Assistant code.
2013-05-19 14:16:36 -04:00
Joey Hess
630a8b9ad2 warning 2013-05-19 12:43:44 -04:00
http://joeyh.name/
4e082feb8c Added a comment 2013-05-19 16:39:45 +00:00
http://me.tinco.nl/
870a77fa26 Added a comment 2013-05-19 15:37:24 +00:00
http://me.tinco.nl/
300646eb6a Added a comment 2013-05-19 15:35:27 +00:00
http://me.tinco.nl/
d4da9bb84b 2013-05-19 15:15:04 +00:00
https://www.google.com/accounts/o8/id?id=AItOawnu1NYw8UF-NoDbKu8YKVGxi8FoZLH7JPs
47680d8e82 Added a comment: Not starting browser on Nexus 7, Android 4.2.2 2013-05-19 14:04:28 +00:00
http://me.tinco.nl/
8626bfd29d Added a comment 2013-05-19 12:37:23 +00:00
https://www.google.com/accounts/o8/id?id=AItOawmubB1Sj2rwFoVdZYvGV0ACaQUJQyiJXJI
d2a59a40bb Added a comment: GTalk/XMPP 2013-05-19 09:58:51 +00:00
https://www.google.com/accounts/o8/id?id=AItOawmUJBh1lYmvfCCiGr3yrdx-QhuLCSRnU5c
f3086f8259 Added a comment 2013-05-19 05:56:46 +00:00
http://me.tinco.nl/
e901e5aa28 Added a comment 2013-05-19 03:15:10 +00:00
http://joeyh.name/
cd21cd9497 Added a comment 2013-05-18 23:59:59 +00:00
Joey Hess
667a832de9 print encryption setup message before action 2013-05-18 19:36:55 -04:00
http://me.tinco.nl/
cae1ca2588 Added a comment 2013-05-18 23:36:22 +00:00
http://me.tinco.nl/
c3effd055a Added a comment 2013-05-18 23:32:32 +00:00
http://me.tinco.nl/
7887c15168 2013-05-18 22:59:11 +00:00
https://me.yahoo.com/a/BjlC7xlnk_b7HrB9HA0fHOnYSha7RhaYa.4-#acb55
263a6ea684 2013-05-18 09:51:13 +00:00
Richard Hartmann
b70af62185 Typo
Combed with extra fine teeth just to make Joey happy ;)
2013-05-18 09:59:53 +02:00
Joey Hess
5482a7b505 Merge branch 'master' of ssh://git-annex.branchable.com 2013-05-17 21:51:14 -04:00
http://yarikoptic.myopenid.com/
c8bc9886a2 Added a comment: Follow-up information on my system 2013-05-18 01:23:28 +00:00
Joey Hess
0db3e02088 ignore test suite failure until it has been gotten to work on windows 2013-05-17 19:59:54 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkGCmVc5qIJaQQgG82Hc5zzBdAVdhe2JEM
4f6d602f8f Fixed a typo 2013-05-17 22:39:50 +00:00
http://joeyh.name/
4090125a1b Added a comment 2013-05-17 22:28:34 +00:00
Joey Hess
48a19771c6 Merge branch 'master' of ssh://git-annex.branchable.com 2013-05-17 18:24:52 -04:00
Joey Hess
3174447a1d blog for the day 2013-05-17 18:24:21 -04:00
https://www.google.com/accounts/o8/id?id=AItOawnSenxKyE_2Z6Wb-EBMO8FciyRywjx1ZiQ
3a0bd23c89 2013-05-17 21:20:42 +00:00
Joey Hess
ba49fc74c8 clean up test dir 2013-05-17 17:01:20 -04:00
Joey Hess
cbed6fe65f run test suite in cygwin so it can find utilities etc 2013-05-17 16:58:36 -04:00
Joey Hess
de3853375e better message 2013-05-17 16:52:50 -04:00
Joey Hess
142bd163a2 ssh warnings 2013-05-17 16:51:46 -04:00
Joey Hess
7f6a82df67 can't test gpg on Windows yet 2013-05-17 16:49:34 -04:00
Joey Hess
b26e20fa59 use posixcompat 2013-05-17 16:47:25 -04:00
Joey Hess
8779ad1be9 try building test suite on windows 2013-05-17 16:45:44 -04:00
Joey Hess
1e7682cf0d update 2013-05-17 16:35:35 -04:00
Joey Hess
29615eb311 run test suite on windows autobuilder 2013-05-17 16:34:19 -04:00
Joey Hess
1b616c5d37 improve handling of receiving object in direct mode when associated files are modified
Before, if a direct mode repo had one or more associated files that
were modifed, moving the object into it would overwrite the associated
files with the pristine object.

Now, modified associated files are left unchanged. To ensure that,
when an object is moved into a direct mode repo, it's not thrown away,
it gets stored in indirect mode.
2013-05-17 16:25:18 -04:00
Joey Hess
7bcfa88e6b fix 2013-05-17 16:25:12 -04:00
Joey Hess
94cb037aa3 store copy in inode cache too 2013-05-17 16:16:10 -04:00
Joey Hess
b8e5b9c645 test suite passes in direct mode
This fixes a bug with git annex add in direct mode. If some files already
existed in the tree pointing at the same key as a file that was just added,
and their content was not present, add neglected to copy the content to
those files.

I also changed the behavior of moveAnnex slightly: When content is moved
into the annex in direct mode, it does not overwrite any content already
present in direct mode files. That content may be modified after all.
2013-05-17 15:59:37 -04:00
Joey Hess
90d44f09eb don't warn about existence of pre-commit hook if it already has the right content 2013-05-17 15:59:03 -04:00