Commit Graph

3264 Commits

Author SHA1 Message Date
Matthias Beyer 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
Matthias Beyer 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
Matthias Beyer 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
Matthias Beyer 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
Matthias Beyer dd5928c1b5 Merge pull request #788 from matthiasbeyer/fix-787
Fix missing [[ on travis
2016-10-08 01:33:23 +02:00
Matthias Beyer 49b054aeda Deny warnings 2016-10-08 00:57:22 +02:00
Matthias Beyer 8f26d5b9c3 Use unused results 2016-10-08 00:57:04 +02:00
Matthias Beyer f73c407e75 Remove unused imports 2016-10-08 00:56:57 +02:00
Matthias Beyer 0a069a401b Remove unused variable 2016-10-08 00:53:52 +02:00
Matthias Beyer 47ca51b895 Remove unused variable 2016-10-08 00:53:44 +02:00
Matthias Beyer 18f575ebe5 Remove unused function 2016-10-08 00:53:29 +02:00
Matthias Beyer 99d34d019b Deny warnings 2016-10-08 00:51:47 +02:00
Matthias Beyer 02d0dfa084 Use unused result 2016-10-08 00:51:42 +02:00
Matthias Beyer 9384f53447 Remove unused imports 2016-10-08 00:51:34 +02:00
Matthias Beyer a9deb488b3 Fix missing [[ on travis 2016-10-08 00:34:38 +02:00
Matthias Beyer 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
Matthias Beyer 7b11e7dabb Add testing implementation for Drop for FileLockEntry 2016-10-07 21:59:37 +02:00
Matthias Beyer d375a6d2c6 Add output to test helper, so we can see in the trace whats happening 2016-10-07 21:59:37 +02:00
Matthias Beyer ae66b00f5f store tests: Add erroring-hook-tests 2016-10-07 21:59:37 +02:00
Matthias Beyer 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
Matthias Beyer cf50ddae33 [CHERRY-PICK] Add testing implementation for Drop for FileLockEntry 2016-10-07 21:18:49 +02:00
Matthias Beyer 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
Matthias Beyer 30875d153f Merge pull request #771 from matthiasbeyer/clap-validators
Clap validators
2016-10-07 19:45:49 +02:00
Matthias Beyer 7611ad2892 Merge pull request #783 from matthiasbeyer/readme-rewrite
Rewrite README.md
2016-10-07 19:05:05 +02:00
Matthias Beyer c72291159e Add comment/documentation for Store::move_by_id() 2016-10-07 17:53:11 +02:00
Matthias Beyer d506e869ca Add dependency: libimagutil 2016-10-07 17:35:43 +02:00
Matthias Beyer 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
Matthias Beyer 1e83ad7bbd Add test for hook execution for each hook position 2016-10-07 17:32:35 +02:00
Matthias Beyer d9f4898a3a Abstract testing of hook execution in helper function 2016-10-07 17:32:35 +02:00
Matthias Beyer d88c5d9a01 Add section about how to stay uptodate 2016-10-07 17:16:45 +02:00
Matthias Beyer e92fe89270 Add more detailed errors 2016-10-07 14:07:17 +02:00
Matthias Beyer fb475784be Refactor codebase to be more readable 2016-10-07 14:04:06 +02:00
Matthias Beyer 9326a83d1f Add changes to index before committing, if config enabled it 2016-10-07 13:53:19 +02:00
Matthias Beyer da92a54088 Check diff, if empty do nothing 2016-10-07 13:37:43 +02:00
Matthias Beyer 921d25ac9c Add StoreUnloadHook registering in runtime 2016-10-06 18:42:18 +02:00
Matthias Beyer e9ce659ce8 Add StoreAction enum type for store unload hook 2016-10-06 18:42:18 +02:00
Matthias Beyer bebb3a3712 Add initial codebase for store-unload hook 2016-10-06 18:42:18 +02:00
Matthias Beyer be323a641e Check whether committing is enabled before doing so 2016-10-06 18:41:12 +02:00
Matthias Beyer 5b7ff231a9 Add helper to check whether committing is enabled 2016-10-06 18:41:12 +02:00
Matthias Beyer 1509e074f8 Add commit-enable settings for all hooks 2016-10-06 18:41:12 +02:00
Matthias Beyer 91c200ca60 Add configuration settings for commit-on-drop feature 2016-10-06 18:41:12 +02:00
Matthias Beyer 5cb3593df4 Add explanation for configuration settings 2016-10-06 18:40:15 +02:00
Matthias Beyer 846c2d0325 Create history file if it does not exist 2016-10-06 18:40:14 +02:00
Matthias Beyer 734826a2cd Add initial readline backend implementation 2016-10-06 18:40:14 +02:00
Matthias Beyer 7fd5645106 Add imagrc example configuration for readline 2016-10-06 18:39:21 +02:00
Matthias Beyer 858f310fda Add error kinds for readline errors 2016-10-06 18:39:21 +02:00
Matthias Beyer 33f02fd776 Add dependencies 2016-10-06 18:39:21 +02:00
Matthias Beyer dd621a08a6 Merge pull request #772 from matthiasbeyer/libimagstore/store-tests-erroring-hooks
libimagstore/store-tests: erroring hooks
2016-10-06 18:30:24 +02:00
Matthias Beyer bb6c4ae896 Merge pull request #750 from matthiasbeyer/libimagstore/store-tests-move-by-id-test
Libimagstore/store: tests move by id test
2016-10-04 14:30:32 +02:00
Matthias Beyer 6abdd88182 Fix wording 2016-10-04 13:49:57 +02:00