Deprecated Features

- Marked the push/pull/merge features as deprecated.
This commit is contained in:
Paul Beckingham 2013-09-10 22:52:38 -04:00
parent bcc9eb3d7a
commit e441b8ca8e
7 changed files with 22 additions and 5 deletions

View file

@ -41,6 +41,7 @@ Features
+ New virtual tags (WEEK, MONTH, YEAR, PARENT). + New virtual tags (WEEK, MONTH, YEAR, PARENT).
+ Added the 'remaining' format for all date columns. + Added the 'remaining' format for all date columns.
+ Protects against interrupt during critical DB commit and sync operations. + Protects against interrupt during critical DB commit and sync operations.
+ The 'push', 'pull' and 'merge' commands now generate a 'deprecated' message.
Bugs Bugs
+ #1195 Random seed not random enough - removed all random number code (thanks + #1195 Random seed not random enough - removed all random number code (thanks

3
NEWS
View file

@ -29,6 +29,9 @@ New configuration options in taskwarrior 2.3.0
Newly deprecated features 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. - 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.
--- ---

View file

@ -52,6 +52,8 @@ CmdMerge::CmdMerge ()
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int CmdMerge::execute (std::string& output) 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 // invoke gc and commit before merging in order to update data files
context.tdb2.gc (); context.tdb2.gc ();
context.tdb2.commit (); context.tdb2.commit ();

View file

@ -50,6 +50,8 @@ CmdPull::CmdPull ()
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int CmdPull::execute (std::string& output) int CmdPull::execute (std::string& output)
{ {
context.footnote ("The 'pull' command is deprecated, and will be removed in a subsequent release.");
std::vector <std::string> words = context.a3.extract_words (); std::vector <std::string> words = context.a3.extract_words ();
std::string file; std::string file;
if (words.size ()) if (words.size ())

View file

@ -52,6 +52,8 @@ CmdPush::CmdPush ()
// Because this is potentially on another machine, no checking can be performed. // Because this is potentially on another machine, no checking can be performed.
int CmdPush::execute (std::string& output) int CmdPush::execute (std::string& output)
{ {
context.footnote ("The 'push' command is deprecated, and will be removed in a subsequent release.");
std::vector <std::string> words = context.a3.extract_words (); std::vector <std::string> words = context.a3.extract_words ();
std::string file; std::string file;
if (words.size ()) if (words.size ())

View file

@ -169,13 +169,13 @@ int CmdShow::execute (std::string& output)
" locale" " locale"
" locking" " locking"
" merge.autopush" " merge.autopush"
" merge.default.uri" " merge.default.uri" // Deprecated 2.3.0
" monthsperline" " monthsperline"
" nag" " nag"
" patterns" " patterns"
" print.empty.columns" " print.empty.columns"
" pull.default.uri" " pull.default.uri" // Deprecated 2.3.0
" push.default.uri" " push.default.uri" // Deprecated 2.3.0
" recurrence.indicator" " recurrence.indicator"
" recurrence.limit" " recurrence.limit"
" regex" " regex"
@ -297,6 +297,7 @@ int CmdShow::execute (std::string& output)
color = warning; color = warning;
} }
// TODO Deprecated.
std::string value = i->second; std::string value = i->second;
// hide sensible information // hide sensible information
if ( (i->first.substr (0, 5) == "push." || if ( (i->first.substr (0, 5) == "push." ||

View file

@ -149,8 +149,14 @@ std::string legacyCheckForDeprecatedVariables ()
it->first.substr (it->first.length () - 12) == ".annotations") it->first.substr (it->first.length () - 12) == ".annotations")
deprecated.push_back (it->first); deprecated.push_back (it->first);
if (it->first == "echo.command" || // {push,pull,merge}.uri Deprecated in 2.3.0
it->first == "edit.verbose" || 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 == "next" ||
it->first == "annotations" || it->first == "annotations" ||
it->first == "export.ical.class") it->first == "export.ical.class")