git-annex/Types
Joey Hess 34c8af74ba fix inversion of control in CommandSeek (no behavior changes)
I've been disliking how the command seek actions were written for some
time, with their inversion of control and ugly workarounds.

The last straw to fix it was sync --content, which didn't fit the
Annex [CommandStart] interface well at all. I have not yet made it take
advantage of the changed interface though.

The crucial change, and probably why I didn't do it this way from the
beginning, is to make each CommandStart action be run with exceptions
caught, and if it fails, increment a failure counter in annex state.
So I finally remove the very first code I wrote for git-annex, which
was before I had exception handling in the Annex monad, and so ran outside
that monad, passing state explicitly as it ran each CommandStart action.

This was a real slog from 1 to 5 am.

Test suite passes.

Memory usage is lower than before, sometimes by a couple of megabytes, and
remains constant, even when running in a large repo, and even when
repeatedly failing and incrementing the error counter. So no accidental
laziness space leaks.

Wall clock speed is identical, even in large repos.

This commit was sponsored by an anonymous bitcoiner.
2014-01-20 04:57:36 -04:00
..
Availability.hs add GETAVAILABILITY to external special remote protocol 2014-01-13 14:41:10 -04:00
Backend.hs handle sha*sum's leading \ in checksum with certian unsual filenames 2012-12-20 17:07:10 -04:00
BranchState.hs remove unused fields 2012-12-19 23:41:54 -04:00
Command.hs fix inversion of control in CommandSeek (no behavior changes) 2014-01-20 04:57:36 -04:00
Crypto.hs partially complete gcrypt remote (local send done; rest not) 2013-09-07 18:38:00 -04:00
Distribution.hs annex.autoupgrade setting 2013-11-22 16:04:20 -04:00
FileMatcher.hs improve matcher data type to allow matching Keys, instead of just files (no behavior changes) 2014-01-18 14:51:55 -04:00
GitConfig.hs add GETAVAILABILITY to external special remote protocol 2014-01-13 14:41:10 -04:00
Group.hs add --ingroup limit 2012-10-08 15:18:58 -04:00
Key.hs file2key should return Nothing if the backend is empty 2013-11-11 15:41:31 -04:00
KeySource.hs add: Improved detection of files that are modified while being added. 2013-02-14 16:54:36 -04:00
Limit.hs improve matcher data type to allow matching Keys, instead of just files (no behavior changes) 2014-01-18 14:51:55 -04:00
Messages.hs Display a warning when a non-existing file or directory is specified. 2012-11-25 17:54:08 -04:00
Option.hs per-command options 2012-01-05 23:11:07 -04:00
Remote.hs add GETAVAILABILITY to external special remote protocol 2014-01-13 14:41:10 -04:00
ScheduledActivity.hs cronner: run jobs triggered by remotes becoming connected (untested) 2013-10-13 17:14:56 -04:00
StandardGroups.hs add PreferredContentExpression type 2014-01-01 19:58:02 -04:00
TrustLevel.hs note 2013-09-20 00:04:37 -04:00
UUID.hs add ConfigMonitor thread 2012-10-20 16:43:35 -04:00