mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Merge command
* Renamed command _merge into merge
This commit is contained in:
parent
b8a3c1b565
commit
7294869d07
4 changed files with 6 additions and 5 deletions
|
@ -134,7 +134,6 @@ void Cmd::load ()
|
|||
commands.push_back ("_ids");
|
||||
commands.push_back ("_config");
|
||||
commands.push_back ("_version");
|
||||
commands.push_back ("_merge");
|
||||
commands.push_back ("_urgency");
|
||||
commands.push_back ("export.csv");
|
||||
commands.push_back ("export.ical");
|
||||
|
@ -174,6 +173,7 @@ void Cmd::load ()
|
|||
commands.push_back (context.stringtable.get (CMD_TIMESHEET, "timesheet"));
|
||||
commands.push_back (context.stringtable.get (CMD_UNDO, "undo"));
|
||||
commands.push_back (context.stringtable.get (CMD_VERSION, "version"));
|
||||
commands.push_back (context.stringtable.get (CMD_MERGE, "merge"));
|
||||
|
||||
// Now load the custom reports.
|
||||
std::vector <std::string> all;
|
||||
|
@ -264,7 +264,7 @@ bool Cmd::isReadOnlyCommand ()
|
|||
// Commands that directly modify the data files.
|
||||
bool Cmd::isWriteCommand ()
|
||||
{
|
||||
if (command == "_merge" ||
|
||||
if (command == context.stringtable.get (CMD_MERGE, "merge") ||
|
||||
command == context.stringtable.get (CMD_ADD, "add") ||
|
||||
command == context.stringtable.get (CMD_APPEND, "append") ||
|
||||
command == context.stringtable.get (CMD_ANNOTATE, "annotate") ||
|
||||
|
|
|
@ -241,7 +241,7 @@ int Context::dispatch (std::string &out)
|
|||
else if (cmd.command == "shell") { handleShell ( ); }
|
||||
#endif
|
||||
else if (cmd.command == "undo") { handleUndo ( ); }
|
||||
else if (cmd.command == "_merge") { tdb.gc ();
|
||||
else if (cmd.command == "merge") { tdb.gc ();
|
||||
handleMerge (out); }
|
||||
else if (cmd.command == "_projects") { rc = handleCompletionProjects (out); }
|
||||
else if (cmd.command == "_tags") { rc = handleCompletionTags (out); }
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#define CMD_SHELL 229
|
||||
#define CMD_CONFIG 230
|
||||
#define CMD_SHOW 231
|
||||
#define CMD_MERGE 232
|
||||
|
||||
// 3xx Attributes
|
||||
#define ATT_PROJECT 300
|
||||
|
|
|
@ -134,7 +134,7 @@ sleep(1);
|
|||
qx{../task rc:remote.rc 4 +gym}; # right_newer
|
||||
|
||||
# merge remote into local
|
||||
my $output_l = qx{../task rc:local.rc _merge remote/undo.data};
|
||||
my $output_l = qx{../task rc:local.rc merge remote/undo.data};
|
||||
|
||||
#check output
|
||||
like ($output_l, qr/Running redo/, "local-merge finished");
|
||||
|
@ -142,7 +142,7 @@ unlike ($output_l, qr/Missing/, "local-merge: no missing entry");
|
|||
unlike ($output_l, qr/Not adding duplicate/, "local-merge: no duplicates");
|
||||
|
||||
# merge local into remote
|
||||
my $output_r = qx{../task rc:remote.rc _merge local/undo.data};
|
||||
my $output_r = qx{../task rc:remote.rc merge local/undo.data};
|
||||
|
||||
# check output
|
||||
like ($output_r, qr/Running redo/, "remote-merge finished");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue