Code Cleanup - undo

- Improved description of most recent change.
- Added timestamp of most recent change.
This commit is contained in:
Paul Beckingham 2009-07-01 01:00:25 -04:00
parent e7ba2ab76d
commit 21c3a0ef48
2 changed files with 19 additions and 18 deletions

View file

@ -528,22 +528,25 @@ void TDB::undo ()
u.pop_back ();
}
Date lastChange (::atoi (when.c_str ()));
std::cout << std::endl
<< "The last modification was made "
<< lastChange.toString ()
<< std::endl;
// confirm
if (prior != "")
{
Task priorTask (prior);
Task currentTask (current);
std::cout << "The last modification was that "
<< taskDifferences (prior, current)
<< std::endl
std::cout << taskDifferences (prior, current)
<< std::endl;
}
else
std::cout << "This was a new task."
<< std::endl
std::cout << " - This was a new task"
<< std::endl;
if (!confirm ("The undo command is irreversible. Are you sure you want to undo the last update?"))
if (!confirm ("The undo command is not reversible. Are you sure you want to undo the last update?"))
throw std::string ("No changes made.");
// Extract identifying uuid.