Commit graph

4795 commits

Author SHA1 Message Date
5e43773158 Do not allow linking with entry itself
Without this check, linking an entry with itself yields the following
error:

    ERROR[   1]: Entry is already borrowed: StoreId { base: Some("/home/m/.imag/store"), id: "notes/test" }
    ERROR[   2]: Error when calling retrieve() -- caused:
    ERROR[   3]: Error when calling get()

Which is semantically correct, but the user may get confused by that.

Instead, we print a nice error message that the entry cannot be linked
to itself.

This is not fixed in libimagentrylink itself, because libimagentrylink
cannot be called for the same entry.
If this would be possible, we would pass two `Entry` objects
mutably to the link functionality routines. This is not possible with
Rusts borrow semantics and therefor yields above error.

We compare strings to check whether the user accidentially linked an
entry with itself because we cannot get StoreIds from Entries because we
cannot get the Entry two times from the store in the first place. So
this is the best we have.
2018-02-11 13:41:16 +01:00
edd5925f88
Merge pull request #1272 from matthiasbeyer/prepare-0.6.0
Prepare 0.6.0 release
2018-02-10 16:38:11 +01:00
ee85ebd8a1 Rename switch for new pandoc version 2018-02-10 15:40:13 +01:00
35bc1009f2 Revert "Fix include path for release"
This reverts commit c229d7d1fc.
2018-02-10 15:14:03 +01:00
c461af6a07 Reorder crates because of changed dependencies 2018-02-10 15:12:51 +01:00
c229d7d1fc Fix include path for release 2018-02-10 15:08:40 +01:00
3b710e082d Add missing Cargo.toml metadata 2018-02-10 14:11:46 +01:00
a1c84a3770 Update date in documentation 2018-02-08 15:59:21 +01:00
1b2c479212 Update changelog for release 2018-02-08 15:58:19 +01:00
b0b06055ca Add new libraries/binaries to release script 2018-02-08 15:43:51 +01:00
4d026131a1
Merge pull request #1232 from matthiasbeyer/doc-overhaul
Doc overhaul
2018-02-07 10:07:27 +01:00
73c1dbbbe8
Merge pull request #1268 from matthiasbeyer/update-license-header-dates
Update dates in license header
2018-02-07 09:04:55 +01:00
56cb21e81a
Merge pull request #1261 from matthiasbeyer/missing-changelog-bugfix-entries
Add missing changelog entries
2018-02-07 09:04:47 +01:00
d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
f852e4e464 Add missing changelog entries 2018-02-07 01:58:37 +01:00
c7e1842000
Merge pull request #1260 from matthiasbeyer/imag-mv/fix-links
imag-mv: Fix links after moving entry
2018-02-07 01:57:11 +01:00
1217d88a50 Fix links after moving entry 2018-02-06 23:37:21 +01:00
864e457dce
Merge pull request #1259 from matthiasbeyer/imag-log/no-leading-space
Do not put a leading space in the log
2018-02-06 23:29:22 +01:00
da74896248
Merge pull request #1258 from matthiasbeyer/imag-log/dont-list-non-log-entries
Do not list entries which are not "log" entries
2018-02-06 22:39:13 +01:00
1b588172dd
Merge pull request #1255 from matthiasbeyer/imag-notes/fix-list
Fix imag-notes list errors
2018-02-06 21:45:37 +01:00
88b7b43d2c Do not put a leading space in the log 2018-02-06 20:54:11 +01:00
f44f13e23a Do not list entries which are not "log" entries 2018-02-06 20:48:47 +01:00
8006edb806
Merge pull request #1251 from matthiasbeyer/imag-error-output
`imag`: Print proper imag command
2018-02-06 20:43:29 +01:00
29e88c5de0 Fix: Header entry setting
The header was not set properly. This fixes this bug.
2018-02-06 20:42:43 +01:00
346e5a9444 Add link to toml_query error types 2018-02-06 20:42:43 +01:00
97e613d8c5 Use libimagstore get iterator
Use libimagstore infrastructure to transform iterator in
StoreIdGetIterator for getting entries from store.
2018-02-06 20:41:13 +01:00
8cba4daf20 Print to stderr 2018-02-06 19:28:27 +01:00
85d1c632d3 Print "imag-<tool>" rather than only "<tool>"
The error output should note "imag-<tool> exited with ..." rather than
only "<tool> exited with ..."
2018-02-06 19:28:08 +01:00
3b138ba881
Merge pull request #1231 from matthiasbeyer/update-kairos
Update kairos dependency: 0.1.0-beta-2 -> 0.1.0
2018-02-05 17:30:55 +01:00
979a25c4d6 Make clear what is meant here. 2018-02-05 16:37:14 +01:00
ed81a5f2e4 Add subchapter on alternative projects 2018-02-05 16:35:56 +01:00
2d62009bc2 Rewrite "The Problem" and "The Approach" 2018-02-05 16:31:21 +01:00
209121f567 Typo 2018-02-05 16:23:54 +01:00
8d7138f6e5 Don't state the obvious here 2018-02-05 16:23:26 +01:00
3a54fc220c
Merge pull request #1229 from matthiasbeyer/imag-diary/timed-seconds
imag-diary: Add second granularity support
2018-02-05 16:20:50 +01:00
e2e3b4f6e2 Update kairos dependency: 0.1.0-beta-2 -> 0.1.0 2018-02-05 16:20:05 +01:00
d1fc8c3995 Add second support in imag-diary commandline interface 2018-02-04 19:51:07 +01:00
1d4015dc9c
Merge pull request #1228 from matthiasbeyer/imag-view/view-content-by-default
Show content by default
2018-02-01 22:53:47 +01:00
ae4ced9587 Show content by default 2018-02-01 21:47:09 +01:00
de613c9ebd
Merge pull request #1227 from matthiasbeyer/libimagentryutil/filtered-iterators
libimagentryutil: filtered iterators
2018-02-01 20:22:12 +01:00
4c9add9deb
Merge pull request #1222 from matthiasbeyer/libimagstore/improve-iterator-extensions
libimagstore: improve iterator extensions
2018-02-01 20:22:02 +01:00
3aa2e6edec Add iterator helper for filtering 2018-02-01 16:46:57 +01:00
06cb8d50fb Make StoreId::is_in_collection() generic over AsRef<str> 2018-02-01 16:46:57 +01:00
eb6ab8f029 Add IsInCollection helper type 2018-02-01 16:46:57 +01:00
da0c1fa594 Rewrite From<> implementations for habit iterators
to be generic over all iterators over StoreIds, so they can be build
directly from them.
2018-02-01 16:46:38 +01:00
3c1a0a51c9 Transform iterator to forget Store reference here 2018-02-01 16:46:38 +01:00
b3f546129a Add StoreIdIteratorWithStore::without_store() 2018-02-01 16:46:38 +01:00
8e931cd79f Change calls to into_get_iter() to not take argument 2018-02-01 16:46:38 +01:00
3b01a9eb2f Add API in StoreIdIteratorWithStore to get acting iterators
This patch adds API functions in the StoreIdIteratorWithStore iterator
type to transform it into a iterator which _does_ something (as in the
`libimagstore::iter` API).

It mimics the API which is offered by `libimagstore::iter`.
2018-02-01 15:47:39 +01:00
030e32e44f Provide StoreId Iterator which has a ref to the Store
This change is needed so we can refactor the "get" iterator to not take
an argument (the store) later, which improves the API.
2018-02-01 15:47:39 +01:00