Thomas Lauf
6d09d8fe13
Add quotes around expected/actual string in assertion message
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-22 22:33:58 +02:00
Dennis Schridde
7fe4d2ff39
on-modify.timewarrior: Deal with non-UTF-8 characters in input data from taskwarrior
...
When input data from taskwarrior (e.g. via bugwarrior) contains UTF-8-illegal characters, `on-modify.timewarrior` would fail:
```
Traceback (most recent call last):
File "$HOME/.task/hooks/on-modify.timewarrior", line 42, in <module>
old = json.loads(sys.stdin.readline())
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 1042: invalid continuation byte
```
This is fixed by manually decoding from stdin's underlying binary I/O object and replacing encoding errors with the Unicode replacement character [1].
[1]: https://docs.python.org/3/library/codecs.html#error-handlers
2019-08-22 21:51:03 +02:00
Dennis Schridde
61a4749d75
Fix on-modify.timewarrior hook for tasks with multi line description
...
If the description contained multiple lines, it would be formatted as a
bytes object, including Python's `b""` marker for byte literals and any
newlines. This would then be passed literally to `timew`, which would
then choke on it, because it would record the newlines in its database.
This patch simply gets rid of the string join/split operations and the
encoding, which solves the issue.
Since we pass arrays instead of strings to `subprocess.call`, we are not
subject to command injection security vulnerabilities.
Fixes: 0b6dbf7e12
2019-08-22 21:39:11 +02:00
Dennis Schridde
5b53f5c3ba
on-modify.timewarrior: Fix "from __future__ imports must occur at the beginning of the file"
...
Fixes the following error with Python 3.6.8:
```
File "$HOME/.task/hooks/on-modify.timewarrior", line 33
from __future__ import print_function
SyntaxError: from __future__ imports must occur at the beginning of the file
```
2019-08-22 21:25:41 +02:00
Thomas Lauf
6c1298ea4e
Add output of new-tag-warnings to check
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-17 18:16:50 +02:00
Thomas Lauf
bf2e36fb57
Make ext/on-modify.timewarrior executable so tests will work
2019-08-17 18:16:42 +02:00
Thomas Lauf
3ec1cd715b
Make Popen spawn intermediate shell
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-16 15:25:15 +02:00
Thomas Lauf
e85cdc7546
Rename test-file
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-16 15:25:15 +02:00
Thomas Lauf
b8ab8d2fe5
Include bash-completion for Timewarrior
...
- Closes #96
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-06 16:59:33 +02:00
Thomas Lauf
2963b145a0
Update ChangeLog
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-02 17:58:24 +02:00
Thomas Lauf
57f9982fd1
Throw error message if start date is earlier than open interval
...
Closes #240
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-02 17:54:08 +02:00
Thomas Lauf
a62ebf0196
Fix link to documentation
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-02 09:40:31 +02:00
Thomas Lauf
924e20e16b
Fix links to package downloads
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-08-02 09:40:17 +02:00
Thomas Lauf
2bdc52c30a
Fix typo
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-07-22 14:31:01 +02:00
Thomas Lauf
220bdd9e5f
Add dates to command calls (fix race condition?)
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-07-01 21:56:29 +02:00
Thomas Lauf
fa2c683e3e
Install python2 along with python(3)
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-29 01:31:48 +02:00
Thomas Lauf
8b5a701eeb
Require python2 not python2.7 for tests
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-29 01:31:08 +02:00
Thomas Lauf
966256cb79
Add 'man' to list of required packages
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-24 21:25:36 +02:00
Thomas Lauf
712b4b78b2
Revert "Run test with available python"
...
This reverts commit 6b89e122
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-24 21:10:57 +02:00
Thomas Lauf
6b89e12287
Run test with available python
...
- do not enforce python 2.7
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-22 21:21:11 +02:00
Thomas Lauf
6e855cc998
Drop internal help for man pages
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-21 23:32:11 +02:00
Thomas Lauf
4556b4f072
Add entries for timew-annnotate and timew-undo in the central man page
2019-06-19 18:05:44 +02:00
Thomas Lauf
f72c4fda52
Extract class Journal from class Database
...
- const-ify Transaction and UndoAction
- Clang-tidying
2019-06-19 18:05:44 +02:00
Thomas Lauf
b15cddd562
Create tag database from existing interval database on startup
...
- Closes #224
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-08 23:00:57 +02:00
Thomas Lauf
eeb9bc4db3
Update AUTHORS & ChangeLog
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-08 21:27:19 +02:00
Thomas Lauf
993ecd5ec0
Update libshared to eadeda5d170bb513e52cf1a00ec2cc9501077bbf
...
- Import fix for #228
2019-06-08 21:00:16 +02:00
Thomas Lauf
8a5132d3e4
Update AUTHORS & ChangeLog
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-04 16:48:50 +02:00
quazgar
1fd6c86641
MAINT: Removing comment.
2019-06-04 16:41:32 +02:00
quazgar
01674283c6
MAINT: on-modify.timewarrior imports from future
...
This should fix #216 .
Untested commit.
2019-06-04 16:41:32 +02:00
Thomas Lauf
27d6c9d6cf
Update AUTHORS & ChangeLog
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-30 14:53:35 +02:00
Thomas Lauf
55370ea86c
Show message if no data within given range
...
- Closes #191
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-28 22:51:57 +02:00
Thomas Lauf
8256b5e625
Removing a stray space char
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-28 21:17:26 +02:00
Thomas Lauf
4ef3e2b232
Update Changelog
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-18 18:49:01 +02:00
Thomas Lauf
037550b791
'-h' should show help
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-18 18:40:26 +02:00
Thomas Lauf
6bb4f981cb
Merge branch '212-fix-help-handling' of git://github.com/sruffell/timewarrior into sruffell-212-fix-help-handling
2019-05-07 22:08:23 +02:00
Thomas Lauf
08d2a0e15a
Add tests for command help
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-07 21:12:22 +02:00
Thomas Lauf
3f35f179e7
Fix typo
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-07 08:17:26 +02:00
Thomas Lauf
d39af37db2
Update libshared to 4178b49db1c5fed5006a4ab6aa2df3f9937f770b
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-03 17:04:07 +02:00
Thomas Lauf
295b7b78f4
Wrap emerge call with keep-alive script
...
- emerge takes longer than 10 minutes for some jobs to output something
- travis kills builds that do not output something for 10 minutes
- Workaround: add a keep-alive script that echos "RUNNING" every minute for one hour. This should keep the door open long enough for emerge to finish...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-05-03 16:52:15 +02:00
Thomas Lauf
ba9cfc95b9
Rename variables
...
- for better readability
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-12 16:13:39 +02:00
Thomas Lauf
297d9e3c19
Remove comments
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-12 15:49:05 +02:00
Thomas Lauf
920e3b4019
Add field reference_hour
, extract determination of color for hour label
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 23:13:41 +02:00
Thomas Lauf
a6b9e4204c
Use fields directly instead of passing them as function parameters
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 22:43:27 +02:00
Thomas Lauf
0510b59460
Make cell width a field
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 22:23:48 +02:00
Thomas Lauf
5085c6ce99
Advertise Travis build status
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:56:24 +02:00
Thomas Lauf
b5dc745969
Add missing 'Z' to datetime string when using UTC
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:44:52 +02:00
Thomas Lauf
f0f49ebef9
Update AUTHORS & ChangeLog
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:42:19 +02:00
Thomas Lauf
186dd8e3de
Fix padding for determined hour range (+1h before and after)
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:39:28 +02:00
Thomas Lauf
36d7b6f387
Consider open track only until reference datetime when determining hour range
...
- Close #107
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:39:28 +02:00
Thomas Lauf
b3799ede03
Use early return
...
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-11 16:07:57 +02:00