Commit Graph

5584 Commits

Author SHA1 Message Date
Matthias Beyer ccbc2b2672
Merge pull request #1478 from matthiasbeyer/imag-diagnostics/progressbar
imag-diagnostics: Add a progressbar to the command
2018-09-27 08:48:22 +02:00
Matthias Beyer 6bf49aa6b5 Fix: 'imag-contact show' should increase output counter 2018-09-27 08:09:39 +02:00
Matthias Beyer 6a81c0afd1
Merge pull request #1507 from matthiasbeyer/update-rust
Update rust compiler versions
2018-09-27 07:53:48 +02:00
Matthias Beyer 6f768fe4ad Add a progressbar to the command
Note: characters in config have to be escaped.
2018-09-27 07:40:10 +02:00
Matthias Beyer 430186799b Remove store flush caching as it is not necessary anymore 2018-09-27 07:31:47 +02:00
Matthias Beyer 1fdb90bc97 Update rust compiler versions 2018-09-26 16:26:27 +02:00
Matthias Beyer d12a35c84f Update templates with "off-of-github" notice 2018-08-26 04:25:38 +02:00
Matthias Beyer 3a768b42de travis: Turn on email notifications
Because we do not use github for development anymore, but still for
travis, we enable notifications so we know whether our builds succeed

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
Matthias Beyer dc49b2265c Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
Matthias Beyer d2bf1751ac Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
Matthias Beyer 9507db6d8e Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
Matthias Beyer ab32f21333 Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
Matthias Beyer 2fa5b2f4bd Add script to check whether binaries are named correctly
It is a simple approach but it works: Read the name of the binary from
the Cargo.toml file and check whether the name appears in the path.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
Matthias Beyer ea77faeae2 imagrc: Abbreviating is supported, remove old comment and update contact.list_format 2018-08-26 04:24:57 +02:00
Matthias Beyer b5c73d9c19 doc: Specify how imag-mail should look like 2018-08-26 04:24:57 +02:00
Matthias Beyer f4e0c1c5eb doc: Add more planned commands for imag-mail 2018-08-26 04:24:57 +02:00
Matthias Beyer 104cbfbfa7 doc: Format for line length 2018-08-26 04:24:57 +02:00
Matthias Beyer 6e56f469ae More verbose erroring in test 2018-08-26 04:24:57 +02:00
Matthias Beyer 5b82d53fd2
Merge pull request #1502 from matthiasbeyer/libimagstore/fs-backend-no-fd-holding
Optimize backend impl to not hold open files
2018-08-26 04:16:04 +02:00
Matthias Beyer 8b508fe4c3 Optimize backend impl to not hold open files
This patch changes the filesystem-backend implementation of libimagstore
to open files on each read/write rather than holding the file handle in
memory at all times.

Whenever a lot of imag store entries are read into memory, the imag
process may ran out of file descriptors. With this patch applied, a
`Store::get()` call on an entry which is not yet in the store cache
would cause the file to be read, but the FD being dropped after that.
Likewise, a `Store::update()` (which is also called if the imag entry is
dropped) would re-open the file on the filesystem and write the contents
from the imag store cache back to the file.

With this patch, opening hundrets or thousands of imag entries should be
no problem anymore, only the available memory should be a limit then.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-11 17:50:22 +02:00
Matthias Beyer f2916aa51a
Merge pull request #1501 from matthiasbeyer/update-travis-rust
Update rust version
2018-08-02 20:52:52 +02:00
Matthias Beyer e960f7d465 Update rust version
As a dependency apparently requires rust 1.26 as minimum version, we
bump here.

Rust 1.28 is out already, so no problems with that!
2018-08-02 19:59:56 +02:00
Matthias Beyer acdc1e84bc
Merge pull request #1495 from matthiasbeyer/imag-diary/fix-missing-header
Imag diary/fix missing header
2018-07-27 20:10:59 +02:00
Matthias Beyer b896bc2657 Fix: Do not create entries with Store::retrieve()
This patch fixes a bug where entries where created with
`Store::retrieve()` rather than with the API from libimagdiary.
This caused headers to be missing.

Now, the CLI is parsed for the values passed and a NaiveDateTime object
is crafted from that, which is then passed to libimagdiary.
2018-07-20 01:37:36 +02:00
Matthias Beyer 22d63f0946 Add functionality to create entry at a certain time 2018-07-20 01:37:36 +02:00
Matthias Beyer 2a62b6dffb
Merge pull request #1496 from matthiasbeyer/libimagstore/fix-use-backend
libimagstore: fix use backend
2018-07-20 01:35:20 +02:00
Matthias Beyer aff6ff105d Remove "Header" extension for Value type 2018-07-19 20:58:27 +02:00
Matthias Beyer f6a7345b4a Simplify: Move header verification from Value extension to Entry type 2018-07-19 20:58:27 +02:00
Matthias Beyer 9ad1c8d6bd Simplify: Move default header generation from Value extension to Entry type 2018-07-19 20:58:27 +02:00
Matthias Beyer 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
Matthias Beyer 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
Matthias Beyer 9315a23754 Fix: Use backend abstraction for checking whether a path exists 2018-07-19 20:58:27 +02:00
Matthias Beyer 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
Matthias Beyer e502040415
Merge pull request #1499 from matthiasbeyer/minor
Minor
2018-07-02 22:01:58 +02:00
Matthias Beyer a138dd408d
Merge pull request #1498 from matthiasbeyer/update-rustc
Update rustc in travis
2018-07-02 22:01:50 +02:00
Matthias Beyer 8d86af5f15 Fix: Use unused result 2018-06-27 00:43:36 +02:00
Matthias Beyer e0156bf4ad Fix: Use unused result 2018-06-27 00:43:24 +02:00
Matthias Beyer 2699e17468 Update rustc in travis 2018-06-23 21:59:36 +02:00
Matthias Beyer 54c5854761 Remove unnecessary call 2018-06-23 21:56:03 +02:00
Matthias Beyer 3bdd5c959b Add documentation to StoreId type 2018-06-23 21:56:03 +02:00
Matthias Beyer c86e4e7db4 Add documentation for Runtime::init_logger() 2018-06-23 21:56:02 +02:00
Matthias Beyer 6ba87a58d1 Add 'Known Problems' section 2018-06-23 21:55:35 +02:00
Matthias Beyer 473f962874 Update lib description 2018-06-23 21:55:35 +02:00
Matthias Beyer cb8c511985 Update lib description 2018-06-23 21:55:35 +02:00
Matthias Beyer d6a19d8645 Update lib description 2018-06-23 21:55:27 +02:00
Matthias Beyer 5847987404 Remove old statement 2018-06-23 21:54:27 +02:00
Matthias Beyer 869f5377f9 Update intro 2018-06-23 21:54:27 +02:00
Matthias Beyer 6e45727f15 Update conventions 2018-06-23 21:54:27 +02:00
Matthias Beyer f9294eb07a doc: Update README 2018-06-23 21:54:27 +02:00