mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CmdUndo
- Converted from Parser to CLI.
This commit is contained in:
parent
506d36d74e
commit
6dbacf684c
1 changed files with 3 additions and 3 deletions
|
@ -45,9 +45,9 @@ CmdUndo::CmdUndo ()
|
||||||
int CmdUndo::execute (std::string& output)
|
int CmdUndo::execute (std::string& output)
|
||||||
{
|
{
|
||||||
// Detect attempts to modify the task.
|
// Detect attempts to modify the task.
|
||||||
std::vector <Tree*>::iterator i;
|
std::vector <A>::iterator a;
|
||||||
for (i = context.parser.tree ()->_branches.begin (); i != context.parser.tree ()->_branches.end (); ++i)
|
for (a = context.cli._args.begin (); a != context.cli._args.end (); ++a)
|
||||||
if ((*i)->hasTag ("MODIFICATION"))
|
if (a->hasTag ("MODIFICATION"))
|
||||||
throw std::string (STRING_CMD_UNDO_MODS);
|
throw std::string (STRING_CMD_UNDO_MODS);
|
||||||
|
|
||||||
context.tdb2.revert ();
|
context.tdb2.revert ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue