diff --git a/src/commands/CMakeLists.txt b/src/commands/CMakeLists.txt index 38ab0e30..ed2a381a 100644 --- a/src/commands/CMakeLists.txt +++ b/src/commands/CMakeLists.txt @@ -30,7 +30,6 @@ set (commands_SRCS CmdCancel.cpp CmdTag.cpp CmdTags.cpp CmdTrack.cpp - CmdUndo.cpp CmdUntag.cpp) add_library (commands STATIC ${commands_SRCS}) diff --git a/src/commands/CmdHelp.cpp b/src/commands/CmdHelp.cpp index 305c15fa..0fa930e2 100644 --- a/src/commands/CmdHelp.cpp +++ b/src/commands/CmdHelp.cpp @@ -89,8 +89,6 @@ int CmdHelpUsage () << " rc.=\n" << '\n'; - // TODO undo - // TODO List all extensions. return 0; @@ -822,8 +820,6 @@ int CmdHelp (const CLI& cli) << "same as the 'start' command.\n" << '\n'; - // TODO undo - // Ruler 1 2 3 4 5 6 7 8 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 else if (words[0] == "untag") diff --git a/src/commands/CmdUndo.cpp b/src/commands/CmdUndo.cpp deleted file mode 100644 index 12a080fd..00000000 --- a/src/commands/CmdUndo.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// Copyright 2015 - 2016, Paul Beckingham, Federico Hernandez. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// http://www.opensource.org/licenses/mit-license.php -// -//////////////////////////////////////////////////////////////////////////////// - -#include -#include - -//////////////////////////////////////////////////////////////////////////////// -int CmdUndo () -{ - std::cout << "[undo: revert last change]\n"; - - // TODO Extract most recent transaction. - // TODO Apply inverse. - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/commands.h b/src/commands/commands.h index 25afb7fb..7d8c4bb5 100644 --- a/src/commands/commands.h +++ b/src/commands/commands.h @@ -56,7 +56,6 @@ int CmdStop (const CLI&, Rules&, Database& ); int CmdTag (const CLI&, Rules&, Database& ); int CmdTags ( Rules&, Database& ); int CmdTrack (const CLI&, Rules&, Database& ); -int CmdUndo ( ); int CmdUntag (const CLI&, Rules&, Database& ); int CmdChartDay (const CLI&, Rules&, Database& ); diff --git a/src/init.cpp b/src/init.cpp index b35dad65..2bb02ea7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -79,7 +79,6 @@ void initializeEntities (CLI& cli) cli.entity ("command", "tag"); cli.entity ("command", "tags"); cli.entity ("command", "track"); - cli.entity ("command", "undo"); cli.entity ("command", "untag"); // Some command list themselves as extensions, to integrate with the real @@ -280,7 +279,6 @@ int dispatchCommand ( else if (command == "tag") status = CmdTag (cli, rules, database ); else if (command == "tags") status = CmdTags ( rules, database ); else if (command == "track") status = CmdTrack (cli, rules, database ); - else if (command == "undo") status = CmdUndo ( ); else if (command == "untag") status = CmdUntag (cli, rules, database ); else if (command == "week") status = CmdChartWeek (cli, rules, database ); else status = CmdReport (cli, rules, database, extensions);