From e441b8ca8e66a2463b60e6cd01337d1137e66461 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 10 Sep 2013 22:52:38 -0400 Subject: [PATCH] Deprecated Features - Marked the push/pull/merge features as deprecated. --- ChangeLog | 1 + NEWS | 3 +++ src/commands/CmdMerge.cpp | 2 ++ src/commands/CmdPull.cpp | 2 ++ src/commands/CmdPush.cpp | 2 ++ src/commands/CmdShow.cpp | 7 ++++--- src/legacy.cpp | 10 ++++++++-- 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 350997fe7..c930723f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,7 @@ Features + New virtual tags (WEEK, MONTH, YEAR, PARENT). + Added the 'remaining' format for all date columns. + Protects against interrupt during critical DB commit and sync operations. + + The 'push', 'pull' and 'merge' commands now generate a 'deprecated' message. Bugs + #1195 Random seed not random enough - removed all random number code (thanks diff --git a/NEWS b/NEWS index 3b1a01b93..0d1a0fb93 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,9 @@ New configuration options in taskwarrior 2.3.0 Newly deprecated features in taskwarrior 2.3.0 - File format 2 (used in version 0.9.3 - 1.5.0) is no longer supported. + - The 'push', 'pull' and 'merge' commands will be removed in a subsequent + release. The new 'sync' command, in conjunction with the Task Server is the + new sync mechanism. --- diff --git a/src/commands/CmdMerge.cpp b/src/commands/CmdMerge.cpp index 31868c613..e1906bf43 100644 --- a/src/commands/CmdMerge.cpp +++ b/src/commands/CmdMerge.cpp @@ -52,6 +52,8 @@ CmdMerge::CmdMerge () //////////////////////////////////////////////////////////////////////////////// int CmdMerge::execute (std::string& output) { + context.footnote ("The 'merge' command is deprecated, and will be removed in a subsequent release."); + // invoke gc and commit before merging in order to update data files context.tdb2.gc (); context.tdb2.commit (); diff --git a/src/commands/CmdPull.cpp b/src/commands/CmdPull.cpp index 40dcbed3a..59cdccf38 100644 --- a/src/commands/CmdPull.cpp +++ b/src/commands/CmdPull.cpp @@ -50,6 +50,8 @@ CmdPull::CmdPull () //////////////////////////////////////////////////////////////////////////////// int CmdPull::execute (std::string& output) { + context.footnote ("The 'pull' command is deprecated, and will be removed in a subsequent release."); + std::vector words = context.a3.extract_words (); std::string file; if (words.size ()) diff --git a/src/commands/CmdPush.cpp b/src/commands/CmdPush.cpp index 43c84d26a..b9a901ee5 100644 --- a/src/commands/CmdPush.cpp +++ b/src/commands/CmdPush.cpp @@ -52,6 +52,8 @@ CmdPush::CmdPush () // Because this is potentially on another machine, no checking can be performed. int CmdPush::execute (std::string& output) { + context.footnote ("The 'push' command is deprecated, and will be removed in a subsequent release."); + std::vector words = context.a3.extract_words (); std::string file; if (words.size ()) diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index 785e64a83..eccef86e1 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -169,13 +169,13 @@ int CmdShow::execute (std::string& output) " locale" " locking" " merge.autopush" - " merge.default.uri" + " merge.default.uri" // Deprecated 2.3.0 " monthsperline" " nag" " patterns" " print.empty.columns" - " pull.default.uri" - " push.default.uri" + " pull.default.uri" // Deprecated 2.3.0 + " push.default.uri" // Deprecated 2.3.0 " recurrence.indicator" " recurrence.limit" " regex" @@ -297,6 +297,7 @@ int CmdShow::execute (std::string& output) color = warning; } + // TODO Deprecated. std::string value = i->second; // hide sensible information if ( (i->first.substr (0, 5) == "push." || diff --git a/src/legacy.cpp b/src/legacy.cpp index 63fb9a4aa..e58410071 100644 --- a/src/legacy.cpp +++ b/src/legacy.cpp @@ -149,8 +149,14 @@ 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" || + // {push,pull,merge}.uri Deprecated in 2.3.0 + if ((it->first.substr (0, 5) == "push." || + it->first.substr (0, 5) == "pull." || + it->first.substr (0, 6) == "merge.") && (it->first.find (".uri") != std::string::npos)) + deprecated.push_back (it->first); + + if (it->first == "echo.command" || // Deprecated in 2.0.0 + it->first == "edit.verbose" || // Deprecated in 2.0.0 it->first == "next" || it->first == "annotations" || it->first == "export.ical.class")