Commit graph

129 commits

Author SHA1 Message Date
Dustin J. Mitchell
aeeec16984
Handle 'until' and 'recur' simiar to handling of 'gc' (#3753)
This centralizes updates to recurrence and 'until' in Command, instead
of doing so in each individual command implementation.

This is preparatory to opening the TaskChampion replica in read-only
mode.
2025-01-18 02:20:41 -05:00
Felix Schurk
93356b39c3 add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
Felix Schurk
954d3f5058 add blank line between cmake.h header include to prevent sorting
* add required comment in the line below cmake.h include header
2024-07-29 22:33:17 +02:00
Bernhard M. Wiedemann
603bf075f1
Fix issues with year 2038 (#3052)
* Fix annotations in year 2038

Fixes #3050

* Ensure 32-bit systems work better after 2038

Without this patch, their 32-bit signed long int could overflow.

This patch was done while working on reproducible builds for openSUSE.
2023-08-30 22:08:31 -04:00
Dustin J. Mitchell
e3dd91d45e use the existing (but misnamed) orphans method 2021-12-16 23:03:44 -05:00
Tomas Babej
0bc92d6115
meta: Adjust copyright headers 2021-09-05 12:02:07 -04:00
Dustin J. Mitchell
413b8d22b7 Remove references to the 'depends' property outside of Task.cpp
With the exception of `taskDifferences` and `taskInfoDifferences`,
deferred to #2572.
2021-08-17 20:36:54 -04:00
Dustin J. Mitchell
20041c120e Refactor to store tags as individual attributes
Each tag is stored as `tag_<tagname>: x`.  The `x` is required because
empty attributes are treated as nonexistent.

For compatibility, the `tags` attribute is updated in sync with the
per-tag attributes.  This compatibility support may be dropped in later
versions.

Note that synchronization _updates_ use JSON format, which does not
change with this patch, and thus no compatibility issues exist.  The
synchronization _initialization_, however, uses FF4, meaning that a
sync server initialized from a version of `task` with this patch will
contain `tag_<tagname>` attributes, which will look like orphaned UDAs
to older versions.  However, as updates to tasks are synchronized via
the sync server, the updates will not contain these attributes and they
will show as "deleted" in the `task info` display on the older version.
Aside from the noise in the `task info` output, this is harmless.
2021-08-05 02:11:27 -04:00
Rosen Penev
5c137f5c8f use emplace
Allows removing the constructor name as emplace forwards the arguments
directly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-05 02:03:59 -04:00
Tomas Babej
693f2f74cd CmdEdit: Respect bulk option
Since 'task edit' is a data-modification operation (that is particularly
hard to cancel mid-way), it should also respect the 'bulk' option like
all the other modification operations (mod, start...).

Closes #2428.
2021-04-03 17:57:08 -04:00
indev
098be0747d fix: remove lock file on interruption of 'task edit' (#2292) 2021-01-14 18:16:34 -05:00
Jochen Sprickerhof
663c6575ce Use str_replace from libshared 2021-01-07 22:37:04 -05:00
Jochen Sprickerhof
a95205357c Support editing multi-line annotations (Closes: #2283)
Since e4b9c1f annotations where JSON encoded in task edit to escape
new lines (\n). But other strings where mangled as well, like https://
becoming https:\/\/, making it hard to edit.

This patch removes the JSON encoding and indents new lines instead.
2021-01-07 22:37:04 -05:00
Tomas Babej
9017cd6e53
doc: Update copyright to 2021 2021-01-02 02:48:22 -05:00
Tomas Babej
a09f9d48ab Update copyright to 2020 2020-11-21 12:27:05 -05:00
Martin Michlmayr
174507e7ad Fix typos 2020-11-17 10:41:13 -05:00
Chad Phillips
cd62e65a13 JSON encode/decode string UDAs
Previously, multiline string UDAs were not preserved when editing
a task via 'task X edit'. String UDAs are now JSON encoded/decoded
during the edit cycle to allow preservation of multiline
2019-04-14 19:34:57 -04:00
Tomas Babej
8066e4e6e2 meta: Update copyright year 2019-01-01 08:46:21 -05:00
Paul Beckingham
1c4647708a TW #2047: Exiting the task editor with an error code doesn't remove the lock file
- Thanks to coaxial
2018-08-12 09:57:32 -04:00
Kirill Bobyrev
5cdbe6d019
Use nullptr instead lf C-styled NULL 2018-03-07 22:21:28 +03:00
Simon Ruderich
e817dfc800 Always use https:// link for opensource.org
It was already used in a few places, make this consistent.
2018-03-04 14:53:07 +01:00
Mark Scannell
7af6db4c17 Portability: Updated to make main re-entrant()
- New INSTALL instructions to emscripten, and AUTHORS for contribution.
2018-01-31 19:45:07 -05:00
Paul Beckingham
d012e5f188 l10n: Eliminated STRING_EDIT_* 2018-01-20 13:42:04 -05:00
Paul Beckingham
6da0d8af95 l10n: Eliminated STRING_EDIT_TABLE_HEADER 2018-01-20 12:59:45 -05:00
Paul Beckingham
aac883241f l10n removal of STRING_UDA_NUMERIC 2018-01-07 13:10:52 -05:00
Paul Beckingham
0de169bb10 Copyright 2018 2017-12-31 19:22:07 -05:00
Paul Beckingham
97b038ce29 Recurrence: Broke out handleUntil as a separate function
- This means until porocesing is no longer controlled by rc.recurrence, which
  was never intended.
2017-04-06 00:29:20 -04:00
Paul Beckingham
0bfac78f1e CmdEdit: Properly captures an unmodified errno 2017-03-02 18:29:42 -05:00
Paul Beckingham
0122b72118 CmdEdit: Code cleanup 2017-01-29 00:26:43 -05:00
Paul Beckingham
12486c16cc TW-1877: task done, task edit, task is now pending
- Thanks to Eric Hymowitz.
2017-01-16 20:48:45 -05:00
Paul Beckingham
4e7576cb79 Merge branch 'recurrence' into 2.6.0 2017-01-07 12:29:11 -05:00
Paul Beckingham
a50e65a134 Copyright update 2017-01-01 12:30:04 -05:00
Paul Beckingham
245ed39b78 Task: Improved method signature 2016-12-31 16:15:24 -05:00
Paul Beckingham
5193f7d03e Task: Improved method signature 2016-12-31 15:55:06 -05:00
Paul Beckingham
cfc3e098c1 Task: Improved method signature 2016-12-31 15:44:13 -05:00
Paul Beckingham
c31e0b106d Task: Renamed ::getUDAOrphans to ::getUDAOrphanUUIDs 2016-12-31 12:27:28 -05:00
Paul Beckingham
cb82795d86 CmdEdit: Converted from ISO8601 to Datetime/Duration 2016-12-11 22:06:47 -05:00
Paul Beckingham
355620c640 libhsared: migrating from local to libshared 2016-12-06 07:20:45 -05:00
Paul Beckingham
363415878c CmdEdit: Migrated from Nibbler to Pig 2016-10-16 23:16:09 -04:00
Paul Beckingham
8922728888 Cleanup: Don't use string literals when character literals are needed 2016-10-14 23:11:28 -04:00
Paul Beckingham
95f4989f77 Cleanup: Don't use string literals when character literals are needed 2016-10-14 22:27:34 -04:00
Paul Beckingham
073ff9032d TW-1754: '\' at end of description in 'task edit' merges task with following task
- Thanks to Scott Kostyshak.
2016-02-02 23:35:30 -05:00
Paul Beckingham
f6a7a8720e TW-1697: Inconsistent failure mode on invalid task id
- Thanks to Daniel Shahaf.
2016-02-02 01:29:22 -05:00
Paul Beckingham
2fc1d83b55 C++11: Proper includes 2016-01-16 12:06:20 -05:00
Federico Hernandez
b87a9225eb Build: Added missing include
- Thanks to Ed Rankin
2016-01-16 17:05:22 +01:00
Paul Beckingham
641d232dea Copyright: Updated to 2016 2015-12-31 15:06:43 -05:00
Paul Beckingham
940c7a793f Portability: Fixed broken build for Cygwin and older GCC
- Thanks to Richard Boß.
2015-11-06 18:22:05 -05:00
Paul Beckingham
5f1edbfce1 Revert "CmdEdit: Converted from strtol to std::stoi/stoul"
This reverts commit cf831a9b7c.
2015-11-02 18:39:41 -05:00
Paul Beckingham
cf831a9b7c CmdEdit: Converted from strtol to std::stoi/stoul 2015-11-01 22:00:44 -05:00
Paul Beckingham
182b5427cd Lexer: Migrated trim(), trimLeft() and trimRight() from text to Lexer 2015-10-30 11:17:23 -04:00