Commit graph

30 commits

Author SHA1 Message Date
579c00b62a Replace hard coded version strings with compiletime env 2018-03-06 12:45:41 +01:00
50461b839a Use output stream from Runtime::stdout() 2018-03-04 13:57:44 +01:00
35ac7ba927 Provide unlink() CLI interface 2018-02-25 18:59:02 +01:00
632d68e0e0 Fix broken pipe panic 2018-02-19 11:14:19 +01:00
3341e3640c
Merge pull request #1224 from matthiasbeyer/git-version-in-version
Git version in version
2018-02-18 20:03:09 +01:00
9469693763 Use new make_imag_version!() macro for building version string 2018-02-13 11:38:34 +01:00
50b0ffa6ae Remove calls to trace_error_exit() 2018-02-12 21:19:48 +01:00
9e3c966d84
Merge pull request #1273 from matthiasbeyer/update-version-numbers
Update version string: 0.6.0 -> 0.7.0
2018-02-11 17:50:52 +01:00
938601f4fd
Merge pull request #1267 from matthiasbeyer/imag-link/do-not-link-entry-with-itself
Do not allow linking with entry itself
2018-02-11 16:07:36 +01:00
30d2c28a22 Update version string: 0.6.0 -> 0.7.0 2018-02-11 14:22:24 +01:00
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
9f48071e48 Do not print "Ok" after successful execution 2018-02-10 16:41:27 +01:00
d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
7731b88c97 Remove map_err_trace_exit() calls in favour of map_err_trace_exit_unwrap() 2018-01-29 09:38:32 +01:00
bfc35e0517 Remove dependency "version"
Because the "version" crate is licensed as GPL, which would us require
to release imag as GPL, we remove the crate now.
2018-01-12 13:33:40 +01:00
3c8dd19d11 Update version strings: 0.5.0 -> 0.6.0 2017-12-25 19:17:07 +01:00
8104b1cf0b Adapt tests
This changes the internal function `link_from_to` a bit, but as this is
only internal we don't care.
2017-12-23 12:57:15 +01:00
9ec5ed9b05 Rewrite imag-link commandline to be intelligent
This patch is a rewrite for the imag-link commandline to automatically
recognize whether an internal or an external link is about to be made
and automatically do the right thing.

The commandline got a lot easier and also smaller in size (as in number
of commands), but the functionality should remain the same.
2017-12-23 12:57:13 +01:00
73f6016221 Update version strings: 0.4.0 -> 0.5.0 2017-09-24 13:05:01 +02:00
39b9c17a0c Add default entry by simply creating an empty Entry 2017-09-19 22:31:23 +02:00
dc263de947 Fix imag-link tests for new header location 2017-09-09 16:36:21 +02:00
3a959ddfd1 Add multi-call tests: add-remove 2017-09-02 17:26:24 +02:00
e7ecea0065 Add test to check links from one entry to two others 2017-09-02 17:26:24 +02:00
d538d5fffe Adapt tests to new UI 2017-09-02 17:26:24 +02:00
2a20306099 Rewrite link listing to work with positional argument 2017-09-02 17:26:24 +02:00
46dcbb828e Rewrite UI to use positional arguments 2017-09-02 17:26:24 +02:00
9094c22abf Fix test helper function 2017-08-31 10:57:19 +02:00
1c079c9501 Import libimagutil properly 2017-08-31 10:57:19 +02:00
ae5255c7c7 Remove unused crate imports
This patch removes unused crate imports reported by newer rust versions.

Some crates were only required for tests, some only for tests with
macro_import - these things were fixed with feature gates.
2017-08-31 10:56:15 +02:00
59a3662ac4 Reorganize code in subdirs 2017-08-27 15:12:09 +02:00