Commit graph

2976 commits

Author SHA1 Message Date
Thomas Lauf
c789de7c4e Add interval filter IntervalFilterAllWithTags
An all-with-tags interval filter accepts all intervals which contain all tags of the given tag set.
This filter is never done, i.e. it will consume all intervals from the stream.

Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:14 +01:00
Thomas Lauf
94f3077a4b Add abstract base class IntervalFilter
Relates to #468

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 22:31:13 +01:00
Thomas Lauf
e4eeca6755 Remove version constraint from fiu-utils and libfiu-dev
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-12-02 21:32:20 +01:00
Thomas Lauf
8d1b89db30 Improve performance-plot script
- Add option to select commands for display
- Use name of data directory as plot title

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-19 23:20:25 +01:00
Thomas Lauf
b87f4a1f5c Fix performance test for command stop
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-19 22:35:37 +01:00
Thomas Lauf
77d4728a09 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-14 12:59:38 +01:00
Lim Ding Wen
82b7e5537d SummaryColors: Fix formatting
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-12 22:15:05 +01:00
Lim Ding Wen
026ef7268f SummaryColors: Handle tags with no user-set colors
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-12 22:15:05 +01:00
Lim Ding Wen
aa08d0a3f2 SummaryColors: Add colors to summary
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-12 22:15:05 +01:00
Thomas Lauf
e90e243496 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 22:14:17 +01:00
Thomas Lauf
07d0dc0a98 Do not add empty exclusion ranges to list
Closes #466

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 21:59:25 +01:00
Thomas Lauf
d54df087cb Add braces to if- and for-statements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 21:59:23 +01:00
Thomas Lauf
11a57e3cc5 Improve timemachine test-script
- Fix `--fail-at-end` option
- Collect errors and print report at end
- Make variable `tests` an array, add safeguards
- Combine cases
- Make variables `dates`, `hours`, `minutes` an array, add `pad_with_zero` function
- Execute test with specific 'runtime', so it picks up fake time
  - Python scripts are then executed as `faketime <date> python3 <test>`
  - Shell scripts as `faketime <date> bash <test>`
  - Everything else as `faketime <date> <test>`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-12 21:59:07 +01:00
Thomas Lauf
269d1dff7b Update AUTHORS, ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-11-09 14:39:50 +01:00
Lim Ding Wen
03443d259d TagColorDoc: Add tag color documentation to timew-chart.
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-07 15:53:06 +01:00
Lim Ding Wen
3ea6a5ccd4 TagColorDoc: Add line break for easier reading.
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-07 15:53:06 +01:00
Lim Ding Wen
c7781927ec TagColorDoc: Added man documentation for configuring tag colors.
Signed-off-by: Lim Ding Wen <limdingwen@gmail.com>
2021-11-07 15:53:06 +01:00
Thomas Lauf
e1b29b388e Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-07-14 21:05:20 +02:00
Shaun Ruffell
7ffb2421a2 AtomicFile: Minor cleanups
1) Remove AtomicFile::impl::find and use std::find_if directly.

2) Remove static functions that take a string for path. Allow the compiler to
construct the Path object as necessary.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-07-13 20:31:55 +02:00
Shaun Ruffell
12696bf40c AtomicFile: Make the forward impl declaration private
This is more consistent with the intent of the code.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-07-13 20:31:55 +02:00
Thomas Lauf
51d90114aa Deactivate macOS 11 test runner
Seems to be not yet available for everyone...

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-13 22:45:57 +02:00
Thomas Lauf
1a7003fa07 Add macOS 11 test runner
Use official system name `macOS`

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-13 22:30:40 +02:00
Thomas Lauf
00dc654813 Reactivate ArchLinux test image
- Switch to Docker Official Image (https://hub.docker.com/_/archlinux)
- Closes #412

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-13 22:30:40 +02:00
Tomas Babej
972051fe11 CONTRIBUTING: Explain how to sign off commits
Signed-off-by: Tomas Babej <tomas@tbabej.com>
2021-06-13 14:55:57 +02:00
Tomas Babej
47c17b6833 README: Add image header and basic badges
Signed-off-by: Tomas Babej <tomas@tbabej.com>
2021-06-13 14:55:57 +02:00
Thomas Lauf
5ecac5b407 Fix CMake installation on CentOS 8 test image
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-11 21:31:38 +02:00
Thomas Lauf
14050d84f3 Update documentation
- Add documentation of `:all` hint
- Add `timew-hints` as `SEE ALSO` to `timew-ranges`

Related to #408

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-06-11 15:05:40 +02:00
Thomas Lauf
35dc22c8ef Enter commit hash for release 1.4.3
Set current version to `1.4.3-dev`
Fix test `version.t` to correctly verify version string

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 14:29:25 +02:00
Thomas Lauf
fc618636aa Prepare for release 1.4.3
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 13:04:33 +02:00
Thomas Lauf
3441b2ed93 Update example en-US holiday file
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 12:24:35 +02:00
Thomas Lauf
7dc8c910d5 Add Asciidoctor to build requirements in INSTALL
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-28 11:46:30 +02:00
Thomas Lauf
67ced9da56 Fix versions for C++14 support
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 23:08:17 +02:00
Thomas Lauf
2372770f6a Increase minimum requirement to C++14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 22:50:52 +02:00
Thomas Lauf
0b74e850fb Fix pyenv setup
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 22:02:02 +02:00
Thomas Lauf
75d3e879d6 Fix always true comparison
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
29d3043f29 Update copyright ranges
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
379959e017 Optimize imports
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:31 +02:00
Shaun Ruffell
e170e344af test/modify: Remove a few unused variables
I left some unused varaibles in a new test functions after copy-paste.

This addresses @laufts comments on #423.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-19 12:22:22 +02:00
Shaun Ruffell
3ea086dcff Allow getTracked to match intervals that intersect with filter
It is not sufficient to stop looking for matching intervals if the
interval start time is before the filter. We really want to make sure
that we pick up any intervals that intersect with the filter.

Fixes bug introduced in (a98bd14 "Simplify getIntervalsById and
getTracked") as part of #423.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-19 12:22:22 +02:00
Thomas Lauf
d133d88247 Update ChangeLog
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 22:18:42 +02:00
Thomas Lauf
0edef6eda4 Use more efficient overload with character
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
f185589f47 Remove note about tests in tarballs
- As mentioned in #380, tarballs will also contain tests so package maintainers can run them

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
63cd94b5c1 Add Asciidoctor to build requirements
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Thomas Lauf
44a386ef9a Increase minimum requirement to C++14
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-16 12:45:38 +02:00
Shaun Ruffell
a98bd14d66 Simplify getIntervalsById and getTracked
The intent here is to make similar the implementations of
getIntervalsById and getTracked, since they are both gathering a
collection of intervals from the database, but they are just using a
different criteria for which ones to pull.

This also eliminates the use of std::deque.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
92697cc1ad test:opensuse1500: Update asciidoctor to 2.0.15
This also installs asciidoctor 2.0.15 explicitly so that if the latest
is changed upstream the update-alternatives line will not break.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
73970b3755 Do not delete and then re-add the latest interval when flattening Database
Eliminates extra noise in the debug output. I.e. from #422 the original
report contained:

  >> 2021-05.data: Deleted inc 20210511T161243Z # "TRACKER-6145"
  >> 2021-05.data: Added inc 20210511T161243Z # "TRACKER-6145"

Which isn't doing anything.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
bba56cc633 getIntervalsById: Only add truly synthetic intervals to synthetic vector
This fixes an error where the latest interval, a non-synthetic interval,
is added to the synthetic array (and marked synthetic) if flatten() is
otherwise not able to convert it to a group of synthetic intervals.

When modify was attempting to edit this interval, it would fail since
synthetic intervals should not be written to the database unless the
database is being flattened and timewarrior believed the interval to be
modified was synthetic.

Closes #422

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
3e5aa0d7ec Trivial: Fix indentation in getIntervalsById
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00
Shaun Ruffell
939491d060 Dump intervals in serialization check
The Interval::dump() method will show if intervals are synthetic or not,
which can be useful when trying to determine why a comparison is
failing.

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-05-16 12:43:49 +02:00