From 189fdaf9ac56a4b633404fe6f3a7caaf5f8edb69 Mon Sep 17 00:00:00 2001 From: Cory Donnelly Date: Wed, 28 Jul 2010 10:18:34 -0400 Subject: [PATCH] Bug #444 - Interactive undo locks pending.data and doesn't give it up - TDB::undo () now exits gracefully when a user declines to proceed with the undo, ensuring context.tdb.unlock () is called --- ChangeLog | 2 ++ src/TDB.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e079ecee7..4f6ab6623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,8 @@ substitution (thanks to Michelle Crane). + Fixed problem with command line configuration overrides that had no values. + + Fixed bug #444, which made task shell unusable after canceling out of an + undo command. ------ old releases ------------------------------ diff --git a/src/TDB.cpp b/src/TDB.cpp index 2429cdcbf..856a0cbd5 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -933,7 +933,11 @@ void TDB::undo () // Output displayed, now confirm. if (!confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?")) - throw std::string ("No changes made."); + { + std::cout << "No changes made." << std::endl; + context.hooks.trigger ("post-undo"); + return; + } // Extract identifying uuid. std::string uuid;