mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug Fix - nag
- TDB::gc now displays a header message. - nag function now piggy-backs on existing locked TDB.
This commit is contained in:
parent
b932d9b9b7
commit
5eb4d23685
3 changed files with 7 additions and 3 deletions
|
@ -509,7 +509,7 @@ void Context::parse (
|
||||||
|
|
||||||
// Reinitialize the context and recurse.
|
// Reinitialize the context and recurse.
|
||||||
initialize ();
|
initialize ();
|
||||||
parse ();
|
parse (args, cmd, task, sequence, subst, filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,6 +196,8 @@ int TDB::loadPending (std::vector <Task>& tasks, Filter& filter)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
mPending.clear ();
|
||||||
|
|
||||||
mId = 1;
|
mId = 1;
|
||||||
char line[T_LINE_MAX];
|
char line[T_LINE_MAX];
|
||||||
foreach (location, mLocations)
|
foreach (location, mLocations)
|
||||||
|
@ -371,6 +373,8 @@ int TDB::gc ()
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
context.header ("gc");
|
||||||
|
|
||||||
// Set up a second TDB.
|
// Set up a second TDB.
|
||||||
Filter filter;
|
Filter filter;
|
||||||
TDB tdb;
|
TDB tdb;
|
||||||
|
|
|
@ -401,10 +401,10 @@ void nag (Task& task)
|
||||||
{
|
{
|
||||||
// Load all pending tasks.
|
// Load all pending tasks.
|
||||||
std::vector <Task> tasks;
|
std::vector <Task> tasks;
|
||||||
context.tdb.lock (context.config.get ("locking", true));
|
|
||||||
Filter filter;
|
Filter filter;
|
||||||
|
|
||||||
|
// Piggy-back on existing locked TDB.
|
||||||
context.tdb.loadPending (tasks, filter);
|
context.tdb.loadPending (tasks, filter);
|
||||||
context.tdb.unlock ();
|
|
||||||
|
|
||||||
// Counters.
|
// Counters.
|
||||||
int overdue = 0;
|
int overdue = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue