diff --git a/src/Cmd.cpp b/src/Cmd.cpp index 86c7d00d3..d8578892c 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -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 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") || diff --git a/src/Context.cpp b/src/Context.cpp index a32d47701..37a606d60 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -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); } diff --git a/src/i18n.h b/src/i18n.h index 0690e6c9f..568052aa7 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -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 diff --git a/src/tests/merge.t b/src/tests/merge.t index 2e1511d92..7b0f99aad 100755 --- a/src/tests/merge.t +++ b/src/tests/merge.t @@ -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");