Commit graph

3484 commits

Author SHA1 Message Date
eec6ef0652 Add agnostic "RefHashingError"
to be used by implementors of Hasher.
2016-10-12 19:17:40 +02:00
80a320d769 Add intermediate buffer type for abstracting away lifetime foo from mailparse 2016-10-12 19:17:40 +02:00
50fbc38984 Initial import of codebase 2016-10-12 19:17:40 +02:00
b53f12c0a6 Add dependencies 2016-10-12 19:17:40 +02:00
726a74e41c Initial import 2016-10-12 19:17:40 +02:00
56c5b8c443 Merge pull request #698 from matthiasbeyer/libimagstore/store-tests
libimagstore: Add Store testing
2016-10-12 14:48:43 +02:00
bbdb86b1d0 Merge pull request #793 from matthiasbeyer/libimagstore/store-tests-integration
libimagstore/store-tests: integration
2016-10-12 12:30:04 +02:00
7abf6cb44c Merge pull request #795 from matthiasbeyer/update-nix-deps
Add dep for pure nix build: which
2016-10-12 11:14:33 +02:00
10b920a149 Merge branch 'libimagstore/store-tests' into libimagstore/store-tests-integration 2016-10-12 11:13:38 +02:00
47bd71accb Merge pull request #794 from matthiasbeyer/libimagstore/store-tests-fix-poisonerror-panic
libimagstore/store-tests: fix poisonerror panic
2016-10-12 11:12:32 +02:00
2cbcfa946c Merge branch 'master' into libimagstore/store-tests-integration
On master, we changed the Store::update() function to do nothing more
than calling Store::_update() and wrapping an error.

On the libimagstore/store-tests branch, we modified the
Store::_update() function to contain an additional flag in the
parameters, whether the File-Lock-Entry internal `precense`-value should
be updated.

This merge commit resolves that conflict.
2016-10-12 08:53:11 +02:00
b4d2f5c1a6 Each test should test with a unique test file name 2016-10-12 08:38:07 +02:00
600059be82 Add error output 2016-10-12 08:38:07 +02:00
27e816fc69 Do not simply unwrap, but return error in case of error 2016-10-12 08:38:07 +02:00
08a93288d7 Add dep for pure nix build: which 2016-10-11 20:13:56 +02:00
006db707fa Merge pull request #789 from matthiasbeyer/warning-cleanup
Warning cleanup
2016-10-11 19:57:17 +02:00
d2b4b523c4 Remove unused imports 2016-10-11 18:35:34 +02:00
ac1af164e9 Merge pull request #775 from matthiasbeyer/libimaginteraction/readline
libimaginteraction: readline support
2016-10-11 18:22:41 +02:00
906e26df6f Merge pull request #759 from matthiasbeyer/libimagstorestdhook/git-commit-on-drop
libimagstorestdhook/git: commit on drop
2016-10-11 18:14:28 +02:00
9bb21e6a19 imag-bookmark: Rewrite add() with iterator helpers 2016-10-11 11:20:38 +02:00
17fba2c47f Merge pull request #790 from matthiasbeyer/libimagstore/store-tests-allowed-erroring-hooks
libimagstore/store: tests allowed erroring hooks
2016-10-11 11:06:55 +02:00
9a8a2f1c29 Add hook tests for hooks that error with an error that does not abort the action 2016-10-09 18:26:16 +02:00
7050067675 Merge pull request #761 from matthiasbeyer/libimagstore/store-tests-more-succeeding-hook-tests
libimagstore/store-tests: more succeeding hook tests
2016-10-09 13:29:48 +02:00
8709e53f0f Merge pull request #786 from matthiasbeyer/libimagstore/store-tests-erroring-hooks
libimagstore/store: tests erroring hooks
2016-10-09 13:28:36 +02:00
dd5928c1b5 Merge pull request #788 from matthiasbeyer/fix-787
Fix missing [[ on travis
2016-10-08 01:33:23 +02:00
49b054aeda Deny warnings 2016-10-08 00:57:22 +02:00
8f26d5b9c3 Use unused results 2016-10-08 00:57:04 +02:00
f73c407e75 Remove unused imports 2016-10-08 00:56:57 +02:00
0a069a401b Remove unused variable 2016-10-08 00:53:52 +02:00
47ca51b895 Remove unused variable 2016-10-08 00:53:44 +02:00
18f575ebe5 Remove unused function 2016-10-08 00:53:29 +02:00
99d34d019b Deny warnings 2016-10-08 00:51:47 +02:00
02d0dfa084 Use unused result 2016-10-08 00:51:42 +02:00
9384f53447 Remove unused imports 2016-10-08 00:51:34 +02:00
a9deb488b3 Fix missing [[ on travis 2016-10-08 00:34:38 +02:00
5202c5112a Add flag for _update() whether precense should be modified
This is a bugfix for an very particular issue.

Here's what happens:

If we create() an FileLockEntry and then update() it, we are running
into a problem because update() calls _update() which changes the
precense status of a FileLockEntry.

Because update() is _consuming_, the FileLockEntry gets drop()ed
afterwards. This _again_ causes _update() to be called, but with a new
presence status, which is not true in this moment (as the FileLockEntry
is still borrowed, but we already marked it as present).

This patch is a short-term fix. The real problem is, that our Store
interface is consuming. If the Store interface would be non-consuming,
this issue wouldn't happen, as the drop() call would not happen.

I'm rather sure that this patch will not be reverted in the process of
rewriting the Store interface to be non-consuming. But we never know.
2016-10-07 21:59:37 +02:00
7b11e7dabb Add testing implementation for Drop for FileLockEntry 2016-10-07 21:59:37 +02:00
d375a6d2c6 Add output to test helper, so we can see in the trace whats happening 2016-10-07 21:59:37 +02:00
ae66b00f5f store tests: Add erroring-hook-tests 2016-10-07 21:59:37 +02:00
095ae19416 [CHERRY-PICK] Add flag for _update() whether precense should be modified
This is a bugfix for an very particular issue.

Here's what happens:

If we create() an FileLockEntry and then update() it, we are running
into a problem because update() calls _update() which changes the
precense status of a FileLockEntry.

Because update() is _consuming_, the FileLockEntry gets drop()ed
afterwards. This _again_ causes _update() to be called, but with a new
presence status, which is not true in this moment (as the FileLockEntry
is still borrowed, but we already marked it as present).

This patch is a short-term fix. The real problem is, that our Store
interface is consuming. If the Store interface would be non-consuming,
this issue wouldn't happen, as the drop() call would not happen.

I'm rather sure that this patch will not be reverted in the process of
rewriting the Store interface to be non-consuming. But we never know.
2016-10-07 21:18:49 +02:00
cf50ddae33 [CHERRY-PICK] Add testing implementation for Drop for FileLockEntry 2016-10-07 21:18:49 +02:00
485d280236 Bugfix: The StoreEntry should know the _new_ StoreId
When moving a entry in the store, we also should tell the StoreEntry
the new id.
2016-10-07 21:18:49 +02:00
30875d153f Merge pull request #771 from matthiasbeyer/clap-validators
Clap validators
2016-10-07 19:45:49 +02:00
7611ad2892 Merge pull request #783 from matthiasbeyer/readme-rewrite
Rewrite README.md
2016-10-07 19:05:05 +02:00
c72291159e Add comment/documentation for Store::move_by_id() 2016-10-07 17:53:11 +02:00
d506e869ca Add dependency: libimagutil 2016-10-07 17:35:43 +02:00
b189bf7b8c Add check if entry is present
If we try to rename an entry that is borrowed, we fail, as renaming an
borrowed entry might result in some _really_ ugly bugs.
2016-10-07 17:32:35 +02:00
1e83ad7bbd Add test for hook execution for each hook position 2016-10-07 17:32:35 +02:00
d9f4898a3a Abstract testing of hook execution in helper function 2016-10-07 17:32:35 +02:00
d88c5d9a01 Add section about how to stay uptodate 2016-10-07 17:16:45 +02:00