From 2cbae3fb9c5e15634e5a5256330d482fe42b0b3e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 20 Oct 2013 14:40:57 -0400 Subject: [PATCH] Deprecated Feature Removal - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. --- ChangeLog | 8 ++++++++ doc/man/taskrc.5.in | 6 ------ src/commands/CmdLog.cpp | 3 +-- src/commands/CmdShow.cpp | 1 - src/feedback.cpp | 16 ++++------------ src/legacy.cpp | 3 +-- test/delete.t | 3 +-- test/undo.t | 1 - test/verbose.t | 3 +-- 9 files changed, 16 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2093ec52c..50b0d92be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2.4.0 () - + +Features + + Removed deprecated 'echo.command' setting, in favor of the 'header' and + 'affected' verbosity tokens. + +Bugs + ------ current release --------------------------- 2.3.0 () - diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index d4c7723d1..fccd46560 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -284,12 +284,6 @@ confirmation before deleting a task, performing bulk changes, or the undo command. The default value is "yes". Consider leaving this setting as "yes", for safety. -.TP -.B echo.command=yes -May be "yes" or "no", and causes the display of the ID and description of any -task when you run the start, stop, do, undo or delete commands. The default -value is "yes". Deprecated - use verbosity tokens 'header' and 'affected'. - .TP .B indent.annotation=2 Controls the number of spaces to indent annotations when shown beneath the diff --git a/src/commands/CmdLog.cpp b/src/commands/CmdLog.cpp index e56e5b868..c21f790f2 100644 --- a/src/commands/CmdLog.cpp +++ b/src/commands/CmdLog.cpp @@ -67,8 +67,7 @@ int CmdLog::execute (std::string& output) context.footnote (onProjectChange (task)); context.tdb2.commit (); - if (context.verbose ("affected") || - context.config.getBoolean ("echo.command")) // Deprecated 2.0 + if (context.verbose ("affected")) output = std::string (STRING_CMD_LOG_LOGGED) + "\n"; return rc; diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index c757a8c84..cb43e944c 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -146,7 +146,6 @@ int CmdShow::execute (std::string& output) " displayweeknumber" " dom" " due" - " echo.command" // Deprecated 2.0 " edit.verbose" // Deprecated 2.0 " editor" " exit.on.missing.db" diff --git a/src/feedback.cpp b/src/feedback.cpp index c4037fb3c..bee6d6ea3 100644 --- a/src/feedback.cpp +++ b/src/feedback.cpp @@ -314,11 +314,8 @@ std::string renderAttribute (const std::string& name, const std::string& value, // void feedback_affected (const std::string& effect) { - if (context.verbose ("affected") || - context.config.getBoolean ("echo.command")) // Deprecated 2.0 - { + if (context.verbose ("affected")) std::cout << effect << "\n"; - } } //////////////////////////////////////////////////////////////////////////////// @@ -329,12 +326,9 @@ void feedback_affected (const std::string& effect) // {1} Quantity void feedback_affected (const std::string& effect, int quantity) { - if (context.verbose ("affected") || - context.config.getBoolean ("echo.command")) // Deprecated 2.0 - { + if (context.verbose ("affected")) std::cout << format (effect, quantity) << "\n"; - } } //////////////////////////////////////////////////////////////////////////////// @@ -346,8 +340,7 @@ void feedback_affected (const std::string& effect, int quantity) // {2} Description void feedback_affected (const std::string& effect, const Task& task) { - if (context.verbose ("affected") || - context.config.getBoolean ("echo.command")) // Deprecated 2.0 + if (context.verbose ("affected")) { if (task.id) std::cout << format (effect, task.id, task.get ("description")) @@ -392,8 +385,7 @@ void feedback_special_tags (const Task& task, const std::string& tag) // Unblocked '' void feedback_unblocked (const Task& task) { - if (context.verbose ("affected") || - context.config.getBoolean ("echo.command")) // Deprecated 2.0 + if (context.verbose ("affected")) { // Get a list of tasks that depended on this task. std::vector blocked; diff --git a/src/legacy.cpp b/src/legacy.cpp index eabb98122..8cf1c3508 100644 --- a/src/legacy.cpp +++ b/src/legacy.cpp @@ -148,8 +148,7 @@ std::string legacyCheckForDeprecatedVariables () it->first.substr (it->first.length () - 12) == ".annotations") deprecated.push_back (it->first); - if (it->first == "echo.command" || - it->first == "edit.verbose" || + if (it->first == "edit.verbose" || it->first == "next" || it->first == "annotations" || it->first == "export.ical.class") diff --git a/test/delete.t b/test/delete.t index 6795964fd..5450902ae 100755 --- a/test/delete.t +++ b/test/delete.t @@ -34,8 +34,7 @@ use Test::More tests => 16; if (open my $fh, '>', 'delete.rc') { print $fh "data.location=.\n", - "confirmation=no\n", - "echo.command=no\n"; + "confirmation=no\n"; close $fh; ok (-r 'delete.rc', 'Created delete.rc'); } diff --git a/test/undo.t b/test/undo.t index 4b5c109eb..de9598bdb 100755 --- a/test/undo.t +++ b/test/undo.t @@ -34,7 +34,6 @@ use Test::More tests => 11; if (open my $fh, '>', 'undo.rc') { print $fh "data.location=.\n", - "echo.command=no\n", "confirmation=no\n"; close $fh; ok (-r 'undo.rc', 'Created undo.rc'); diff --git a/test/verbose.t b/test/verbose.t index d8b9b60d8..af7947b70 100755 --- a/test/verbose.t +++ b/test/verbose.t @@ -34,8 +34,7 @@ use Test::More tests => 8; if (open my $fh, '>', 'verbose.rc') { print $fh "data.location=.\n", - "echo.command=off\n"; - print $fh "print.empty.columns=yes\n"; + "print.empty.columns=yes\n"; close $fh; ok (-r 'verbose.rc', 'Created verbose.rc'); }