Commit graph

6099 commits

Author SHA1 Message Date
Dustin J. Mitchell
6981aaccf2 Add a <vector> include in Replica.h
Replica.h refers to std::vector, so this header file must be included.
2022-12-18 12:58:38 -05:00
John Nguyen
591d6ccffb Bump libshared submodule 2022-12-18 12:33:36 -05:00
Dustin J. Mitchell
a93a3aa4f9 Update Cargo.lock (see #2994) 2022-11-12 17:49:42 -05:00
Dustin J. Mitchell
f5e976ae73 remove leftover src/taskchampion submodule 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
12ecfa2b1e rename rust/ to taskchampion/ 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
8c30400af3 Add a C++ wrapper around TC FFI
This uses CMake to build a simple Rust library (in `src/tc/rust`) that
just re-exports everything from the `taskchampion-lib` crate.

The C++ wrappers then wrap this into C++ objects with proper lifecycle
maintenance, in the `tc` namespace.

The C++ wrappers are incomplete, and missing methods are tagged with
"TODO".  These will be added as needed.
2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
35c8ce2ccb Remove references to TDB2::read_only
A TC replica is always read-write.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
f452100588 Remove references to TDB2::data_size
This value will is not relevant for TaskChampion.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
e3ef6c504a remove TBD2::clear, only used in tests 2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
271d06cd9c make TDB2.pending/completed non-public
References to methods on these fields are replaced with methods on TDB2,
several of which already existed.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
4ebd0ffb39 make TDB2.undo non-public
The stats command calls an API to provide this information in a way that
will still be relevant for TaskChampion, while CmdInfo's access to the
data remains.  The TaskChampion interface for per-task hitsory is still
not ready.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
c8cfcec48b Make TDB2.backlog non-public
The stats command gets this information from an API that will also work
for TaskChampion.  The sync command still accesses the field directly,
as the command must be completely rewritten for TaskChampion.
2022-06-21 12:05:50 -04:00
Raf Czlonka
92a9a716a8 Use 'speakers' instead of 'users'.
"Non-English users" sounds very much like "users who are not English".
Also, "Non-English speakers" is already a well established phrase.
2022-06-12 18:30:20 -04:00
Raf Czlonka
12bdc0d480 Fix typo: 'holday' -> 'holiday'
While there, be consistent when using hyphens.
2022-06-12 18:30:20 -04:00
sec65
0d63165ca5 TW-2763: added hooks.location to show command 2022-06-12 18:11:05 -04:00
Nikos Koukis
4c179a427d Fix issue with filter not applied correctly during task _tags command
Also includes:

* Add cmake build directory + Session.vim files to .gitignore list
2022-05-31 01:31:28 -04:00
Tomas Babej
0a558ef7c8 Context: Add a reminder to mirror options in the vim syntax file 2022-05-07 21:52:22 -04:00
Dominik Rehák
27f3e95f12 ColTypeDate: Fix countdown style width 2022-05-07 21:48:07 -04:00
Jackson Abascal
c3bb3810be Fix urgency inheritance for negative-urgency tasks 2022-04-13 11:38:30 -04:00
Dominik Rehák
8c3aa95224 CmdInfo: Fix leading spaces before urgency value
The minimal field width is set to 4, so if the value is shorter, it gets
prefixed with spaces, breaking the flow of the table.
2022-04-13 11:22:49 -04:00
Tomas Babej
1fc1884017 Context: Add parent column among default ones for the recurring report
This helps to identify parent-child relationships.
2022-03-14 02:48:13 -04:00
Tomas Babej
75ce386b44 Context: Adjust definition of the recurring report filter
Ensure the recurring report lists the recurring parent tasks as well as
the child tasks.
2022-03-14 02:48:13 -04:00
Jan Palus
d541e0da65 TLSClient: fix multiple issues with error handling
- do not check errno on successful function calls (it might not be
  cleared after previous failed one)
- GNUTLS_E_* are not passed through errno but as function return value
- therefore there's more error spectrum than -1
- do not assume whole header is received, check number of bytes fetched

small additional improvements:
- read as many bytes into buffer as possible before appending to data
- skip writing nul byte at the end of buffer and use append() instead
- additional sanity checks
2022-02-11 00:19:04 -05:00
Patrick Flakus
59a1729a05 Cleanup: Fixed typo in docstring 2022-01-27 16:10:47 -05:00
Tomas Babej
112ac54a57 ColDepends: Support dependency removal for the same formats as dependency addition 2022-01-19 20:11:41 -05:00
Dustin J. Mitchell
28e268bd26 fix parsing invalid depends from server
The data from the server is read via Task::parseJSON, not Task::parse.

This also reverts the tests for Task::parse, and adds new tests for this
specific issue.
2022-01-19 19:34:45 -05:00
Dustin J. Mitchell
7321febe4f A more thorough fix to corruption of the depends property 2022-01-19 19:34:45 -05:00
Dustin J. Mitchell
96d6c1df9f Add special case for taskserver mis-formatting of depends 2022-01-16 15:36:21 -05:00
Dustin J. Mitchell
b066a17ebe use a reference in CurrentTask 2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
277ce0e226 Update doc comment in src/Context.h
Co-authored-by: Tomas Babej <tomas@tbabej.com>
2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
65830dd705 replace the global contextTask with a Context field 2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
53127bf844 add Context::withCurrentTask 2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
2ea6dd627e Just set contextTask in Task::modify
Based on the observation that every command was setting contextTask
immediately before calling `task.modify(..)`.
2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
db26a28bf9 move domSource to Eval, as it's an Eval source 2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
6e9ad1048d move use of contextTask out of columns, into commands 2021-12-30 15:03:37 -05:00
Dustin J. Mitchell
4fa1c0bcfb remove temporary function 2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
e3dd91d45e use the existing (but misnamed) orphans method 2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
e768e2c100 compare Tasks directly, not their properties 2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
ac24ec1387 fixup and fix spelling for denotate 2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
9f149a7f35 use Task::getAnnotations to get annotatoins 2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
70f83b34ef Move diff formatting into Task (simple refactor)
The Task class already included two forms of diff. This adds another
two.
2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
8d3953183a Only set contextTask if not adding a new task
When adding a new task, the current task is empty, so there is no
context in which to evaluate DOM references.  #2683 will address this in
a more robust fashion.
2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
2812a8c77a Refactor getDOM to use a pointer for the optional context
It's possible to call getDOM without a contextual task.  Previously,
this was done by referencing a "dummy" task which necessitated a way to
distinguish such dummy tasks.  This switches to using a pointer and
treating the NULL value as meaning there is no context.

Note that this cannot use `std::optional<&Task>`, as optional does not
support reference types.
2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
3af5ceadc1 Return early from getDOM if there is no contextual task (refactor)
Before this change, all conditionals checked `have_ref`; returning early
is clearer.
2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
0d9e402d3e Add Task.is_empty, needed to identify "dummy" tasks (simple refactor)
getDOM takes an &Task that may be a reference to a dummy, or may be a
real task.  The is_empty method replaces `task.data.size() == 0` as a
way to distinguish the two.
2021-12-16 23:03:44 -05:00
Dustin J. Mitchell
dede40bc4e Replace direct Task.data access with a temp getter (syntactic refactor)
Now this getter, `data_removeme`, can easily be grepped out and
replaced, one usage at a time in small PRs.
2021-12-16 23:03:44 -05:00
Tomas Babej
3a00956144 ColDepends: Allow specifying short(er) UUIDs 2021-12-03 03:57:37 -05:00
Siôn le Roux
01add8a34a docs: Fix typo in XDG news
This had XFG written in it, it's surely a typo of XDG since on the next
line it's written correctly.
2021-11-23 21:05:01 +01:00
Tomas Babej
d54c7e090e Task: Correctly handle bulk removal of virtual tags/depends attributes
This edge case would happen if a user issued a following command

    $ task 1 mod depends:
or

    $ task 1 mod tags:

which would not perform as expected for tasks with non-empty depends /
tags attributes.

The problem under the hood is the fact that current synchronization
between 'tags" attribute and its constituent decomposed `tag_X`
attributes is performed in a way where the set of tags obtained from
`tag_X` attributes is taken as the source of truth.

If the legacy 'tags:' attribute was set to empty, the fixTags() method
would then restore its previous value from the `tag_X` attributes,
effectively leading to a no-op.

The same happens with dependencies. The fix here is to detect removal of
depends and tags attributes, and instead of setting the legacy
attributes to empty values, we iteratively remove all tags/dependencies.

Closes #2655.
2021-11-22 15:51:27 +01:00
Tomas Babej
0558b6c7aa ColDepends: Recognize and properly handle ID ranges 2021-11-20 15:19:34 -05:00