Dustin J. Mitchell
96d6c1df9f
Add special case for taskserver mis-formatting of depends
2022-01-16 15:36:21 -05:00
Tomas Babej
cb058f2e4b
tests: Remove Ubuntu 20.10 (now beyond EOL) from the test matrix
2022-01-05 21:01:21 -05:00
Dustin J. Mitchell
c564bbc0b7
fix test to pass at the end of the year
2021-12-30 15:03:37 -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
e98b61f2b5
test for dashes in proj without incidentally testing DOM references in 'task add'
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
3a61289f6c
replace a use of Task::data in tests
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
a09712d5d2
docs: Document #2655
2021-11-22 15:51:27 +01:00
Tomas Babej
8074e509ba
tests: Add bulk removal test for tags attribute
2021-11-22 15:51:27 +01:00
Tomas Babej
af10774aec
tests: Add bulk removal test for depends attribute
2021-11-22 15:51:27 +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
Dustin J. Mitchell
3937f1efb0
Don't look for a specific sha when testing task version
...
This allows tests to pass even with a dirty working copy or when running
tests via `git rebase`.
2021-11-21 23:34:46 +01:00
Tomas Babej
3e8190831c
docs: Document #502
2021-11-20 15:19:34 -05:00
Tomas Babej
3c2b74a36f
tests: Remove expected failure for ID-range based dependencies
2021-11-20 15:19:34 -05:00
Tomas Babej
0558b6c7aa
ColDepends: Recognize and properly handle ID ranges
2021-11-20 15:19:34 -05:00
Tomas Babej
774f6df210
docs: Document #2671
2021-11-09 08:00:05 -05:00
Tomas Babej
1e1c0e8f04
libshared: Bump to include fix for soww
...
See https://github.com/GothenburgBitFactory/libshared/pull/66 for
reference. Closes #2671 .
2021-11-09 07:57:37 -05:00
Tomas Babej
caf0f9db3e
tests: Clarify we're testing OpenSUSE 15.x rolling
2021-11-06 13:08:51 -04:00
Tomas Babej
da43078eba
tests: Add Ubuntu 21.10 into the test matrix
2021-11-06 12:59:16 -04:00
Tomas Babej
6fae705b43
tests: Add Ubuntu 20.10 into the test matrix
2021-11-06 12:57:26 -04:00
Tomas Babej
e4f1e05c1d
tests: Add Fedora 35 into the test matrix
2021-11-06 12:54:46 -04:00
Tomas Babej
4559287d07
tests: Remove tests on F31
...
This distribution release is more than a year out of its support window.
2021-11-06 12:52:24 -04:00
Tomas Babej
2d4776586d
README: Remove inacurrate badge
...
The commit count has been inacurrate for some time, undercounting
(perhaps due to aggreessive caching), but also overcounting at times
(due to merges).
2021-11-06 12:39:22 -04:00
Tomas Babej
ed4b932530
tests: Add test to cover invalid contexts due to tag exclusion
2021-11-06 11:58:47 -04:00
Tomas Babej
f0f704fc99
tests: Fix copy-paste error
...
The context name in these two tests was invalid in some assertions.
2021-11-06 11:58:46 -04:00
Tomas Babej
403c44b1fa
docs: Document #2664
2021-11-06 11:58:45 -04:00
Tomas Babej
493f36ecdd
CmdContext: Utilize new reason-providing validateWriteContext
2021-11-06 11:53:45 -04:00
Tomas Babej
5d8f8dac35
validateWriteContext: Refactor to return the underlying reason for invalidity directly
2021-11-06 11:53:44 -04:00
Tomas Babej
f5dce013ce
CmdContext: Expand the definition of an invalid write context to incllude tag exclusion
2021-11-06 11:53:44 -04:00
Tomas Babej
531881f651
validateWriteContext: Tag exclusion should also be detected as invalid write context
2021-11-06 11:53:43 -04:00
Tomas Babej
7de681aa3b
validateWriteContext: Apply early break when detected the OR operator
2021-11-06 11:53:42 -04:00
Jakub Wilk
04ef785eea
Fix typo
2021-11-06 11:50:02 -04:00