Commit graph

5610 commits

Author SHA1 Message Date
22d63f0946 Add functionality to create entry at a certain time 2018-07-20 01:37:36 +02:00
2a62b6dffb
Merge pull request #1496 from matthiasbeyer/libimagstore/fix-use-backend
libimagstore: fix use backend
2018-07-20 01:35:20 +02:00
aff6ff105d Remove "Header" extension for Value type 2018-07-19 20:58:27 +02:00
f6a7345b4a Simplify: Move header verification from Value extension to Entry type 2018-07-19 20:58:27 +02:00
9ad1c8d6bd Simplify: Move default header generation from Value extension to Entry type 2018-07-19 20:58:27 +02:00
1705ecbbff Fix: Remove (empty) Drop implementation for Store
The StoreEntry drop implementation takes care of unlocking the files.
2018-07-19 20:58:27 +02:00
b774ac0e67 Fix: Deleting an Entry could leave artifacts in cache
This patch fixes a bug we did not even hit (yet). It is: When deleting
an Entry from the store, this could potentially leave artifacts in the
cache.

Szenario: An Entry, which was loaded (via `Store::get()` for example),
gets `Store::delete()`ed twice. The first call would work as expected,
but leave the Entry in the Store cache. The second call would then fail,
as the Entry is already removed on the FS, but still in the cache. This
would fail - which is the right thing to do here - but with the wrong
error (with a FileError rather than a FileNotFound error).

This patch fixes this.

First of all, the appropriate `PathBuf` object is calculated in all
cases, as this object is needed to check whether the file is actually
there (which could be the case if the Entry is in the cache and if it is
not).

If the entry is in the cache and is borrowed: error. If not, remove the
entry from the cache. Afterwards the file is deleted on disk.

If the entry is not in the cache, but the file exists, the file is removed.
If the file does not exist: error.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-07-19 20:58:27 +02:00
9315a23754 Fix: Use backend abstraction for checking whether a path exists 2018-07-19 20:58:27 +02:00
851db4abe4
Merge pull request #1500 from newpavlov/master
Replaced rust-crypto with RustCrypto crates
2018-07-19 05:56:29 +02:00
newpavlov
04b3e7243d replaced rust-crypto with RustCrypto crates 2018-07-18 19:51:05 +03:00
e502040415
Merge pull request #1499 from matthiasbeyer/minor
Minor
2018-07-02 22:01:58 +02:00
a138dd408d
Merge pull request #1498 from matthiasbeyer/update-rustc
Update rustc in travis
2018-07-02 22:01:50 +02:00
8d86af5f15 Fix: Use unused result 2018-06-27 00:43:36 +02:00
e0156bf4ad Fix: Use unused result 2018-06-27 00:43:24 +02:00
2699e17468 Update rustc in travis 2018-06-23 21:59:36 +02:00
54c5854761 Remove unnecessary call 2018-06-23 21:56:03 +02:00
3bdd5c959b Add documentation to StoreId type 2018-06-23 21:56:03 +02:00
c86e4e7db4 Add documentation for Runtime::init_logger() 2018-06-23 21:56:02 +02:00
6ba87a58d1 Add 'Known Problems' section 2018-06-23 21:55:35 +02:00
473f962874 Update lib description 2018-06-23 21:55:35 +02:00
cb8c511985 Update lib description 2018-06-23 21:55:35 +02:00
d6a19d8645 Update lib description 2018-06-23 21:55:27 +02:00
5847987404 Remove old statement 2018-06-23 21:54:27 +02:00
869f5377f9 Update intro 2018-06-23 21:54:27 +02:00
6e45727f15 Update conventions 2018-06-23 21:54:27 +02:00
f9294eb07a doc: Update README 2018-06-23 21:54:27 +02:00
33789a0da8 Change contributing documentation
For after we leave github, the documentation on how to  contribute has
to be adjusted.
This patch does this.
2018-06-23 21:54:27 +02:00
eb682d76e8 Prettify error messages 2018-06-15 22:07:13 +02:00
c8da09f687
Merge pull request #1491 from matthiasbeyer/fix-rustc126-flatten-warning
Fix: Explicitely use Itertools::flatten()
2018-05-11 21:04:13 +02:00
c911be87ee
Merge pull request #1492 from matthiasbeyer/update-travis
Update travis
2018-05-11 21:04:08 +02:00
f912d3e7f3
Merge pull request #1489 from matthiasbeyer/imag-log/fix-duplicated-printing
Fix: Duplicated printing of entries with "show --all"
2018-05-11 21:04:02 +02:00
3b97db5c25 Fix: Duplicated printing of entries with "show --all"
The problem was that the used `Diary::diary_names()` iterator does not
call `unique()` on its output.
That decision was made because the return type would get more
complicated with that feature.

Now that rustc 1.26 with Impl Trait is out, we can refactor the return
types of these functions (so also with `Diary::diary_names()`) to
automatically do this.
2018-05-11 15:45:50 +02:00
e0678c9b18 Update travis
Use rustc 1.24, 1.25 and stable (1.26).
2018-05-11 15:45:47 +02:00
8d1022b1ac Fix: Explicitely use Itertools::flatten()
As of rustc 1.26, the `flatten()` method on iterators is preserved by
the rust standard library.
This could cause this code to hard-error some time in the future with
the `flatten()` function actually implemented by the standard library.

Hence we move to use the `Itertools::flatten()` function here
explicitely.
2018-05-11 15:45:42 +02:00
7c44bc1aa3
Merge pull request #1493 from matthiasbeyer/fix-rustc-126
Fix comment for rustc 1.26
2018-05-11 15:45:36 +02:00
2e41656d1a Fix comment for rustc 1.26 2018-05-11 14:55:23 +02:00
30d5837950
Merge pull request #1485 from matthiasbeyer/post-release-patches
Post release patches
2018-05-10 08:38:58 +02:00
1b764d90ce Move to appropriate position in release script 2018-05-09 11:39:33 +02:00
664edc7943 Update version string: 0.8.0 -> 0.9.0 2018-05-09 11:39:33 +02:00
8071496dcf
Merge pull request #1484 from matthiasbeyer/prepare-0.8.0
Prepare for 0.8.0
2018-05-09 10:26:35 +02:00
be0c8c658b Update date 2018-05-08 21:37:19 +02:00
31e320e2e5 Add changelog for 0.8.0 2018-05-08 21:37:19 +02:00
a0d7f8321f
Merge pull request #1483 from matthiasbeyer/readme-vacation-notice
Readme vacation notice
2018-05-04 13:23:27 +02:00
dd3adcd08d
Merge pull request #1482 from matthiasbeyer/libimagrt/cli-validation
libimagrt: cli validation
2018-05-04 13:13:33 +02:00
16dafb17f4
Merge pull request #1481 from matthiasbeyer/imag-category/init
imag-category: Initial import
2018-05-04 12:05:47 +02:00
794eb4faeb Add github pull request/issue template 2018-05-04 11:51:11 +02:00
3f9c98a851 Add vacation notice 2018-05-04 11:46:41 +02:00
c65a3d1af9 Add CLI validators in default CLI setup 2018-05-04 11:21:49 +02:00
9bf3f6da1b Update help 2018-05-04 11:20:09 +02:00
23c3a4b863 Update help, clap does the rest here 2018-05-04 11:19:47 +02:00