mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
TDB2
- Corrected maintenance of the _lines vector during TDB2::add_line. - Implemented TDB2::modify_task undo maintenance. - Added unit tests for TDB2. Which fail.
This commit is contained in:
parent
ab931b6af2
commit
0eec42ce4a
2 changed files with 60 additions and 30 deletions
|
@ -134,6 +134,7 @@ void TF2::add_line (const std::string& line)
|
|||
{
|
||||
// std::cout << "# TF2::add_line " << _file._data << "\n";
|
||||
|
||||
_lines.push_back (line);
|
||||
_added_lines.push_back (line);
|
||||
_dirty = true;
|
||||
}
|
||||
|
@ -466,17 +467,17 @@ void TDB2::modify (const Task& task)
|
|||
else
|
||||
pending.modify_task (task);
|
||||
|
||||
// TODO Add undo data lines:
|
||||
// time <time>
|
||||
// old <task>
|
||||
// new <task>
|
||||
// ---
|
||||
/*
|
||||
undo.add_line ("time " + format (time (NULL)) + "\n");
|
||||
Task original;
|
||||
get (task.get ("uuid"), original);
|
||||
|
||||
undo.add_line ("time " + Date ().toEpochString () + "\n");
|
||||
undo.add_line ("old " + original.composeF4 ());
|
||||
undo.add_line ("new " + task.composeF4 ());
|
||||
undo.add_line ("---\n");
|
||||
*/
|
||||
|
||||
// Add modified task to backlog.
|
||||
backlog.modify_task (task);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue