diff options
| author | zousar <[email protected]> | 2024-04-04 22:00:43 -0600 |
|---|---|---|
| committer | zousar <[email protected]> | 2024-04-04 22:00:43 -0600 |
| commit | 5398aa3113561e11e09ec43e0f8a653379ed931f (patch) | |
| tree | d1ded1aa0f4de12797fdad02c43cb15df8fa3bca /src | |
| parent | 5.4.4-pre0 (diff) | |
| download | zen-5398aa3113561e11e09ec43e0f8a653379ed931f.tar.xz zen-5398aa3113561e11e09ec43e0f8a653379ed931f.zip | |
Categorize the clean argument on oplog-import as a general arg
Diffstat (limited to 'src')
| -rw-r--r-- | src/zen/cmds/projectstore_cmd.cpp | 4 | ||||
| -rw-r--r-- | src/zen/cmds/projectstore_cmd.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/zen/cmds/projectstore_cmd.cpp b/src/zen/cmds/projectstore_cmd.cpp index 40ba48137..ce34e6379 100644 --- a/src/zen/cmds/projectstore_cmd.cpp +++ b/src/zen/cmds/projectstore_cmd.cpp @@ -1016,6 +1016,7 @@ ImportOplogCommand::ImportOplogCommand() "<chunksize>"); m_Options.add_option("", "f", "force", "Force import of all attachments", cxxopts::value(m_Force), "<force>"); m_Options.add_option("", "a", "async", "Trigger import but don't wait for completion", cxxopts::value(m_Async), "<async>"); + m_Options.add_option("", "", "clean", "Delete existing target oplog", cxxopts::value(m_Clean), "<clean>"); m_Options.add_option("", "", "ignore-missing-attachments", @@ -1052,7 +1053,6 @@ ImportOplogCommand::ImportOplogCommand() m_Options.add_option("", "", "zen", "Zen service upload address", cxxopts::value(m_ZenUrl), "<url>"); m_Options.add_option("zen", "", "source-project", "Zen source project name", cxxopts::value(m_ZenProjectName), "<sourceprojectid>"); m_Options.add_option("zen", "", "source-oplog", "Zen source oplog name", cxxopts::value(m_ZenOplogName), "<sourceoplogid>"); - m_Options.add_option("zen", "", "clean", "Delete existing target Zen oplog", cxxopts::value(m_ZenClean), "<clean>"); m_Options.add_option("", "", "file", "Local folder path", cxxopts::value(m_FileDirectoryPath), "<path>"); m_Options.add_option("file", "", "name", "Local file name", cxxopts::value(m_FileName), "<filename>"); @@ -1153,7 +1153,7 @@ ImportOplogCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** arg bool CreateOplog = false; if (HttpClient::Response Result = Http.Get(Url, HttpClient::Accept(ZenContentType::kJSON))) { - if (m_ZenClean) + if (m_Clean) { ZEN_WARN("Deleting oplog '{}/{}'", m_ProjectName, m_OplogName) Result = Http.Delete(Url, HttpClient::Accept(ZenContentType::kJSON)); diff --git a/src/zen/cmds/projectstore_cmd.h b/src/zen/cmds/projectstore_cmd.h index 5a3f7281b..0bec7b4e1 100644 --- a/src/zen/cmds/projectstore_cmd.h +++ b/src/zen/cmds/projectstore_cmd.h @@ -177,6 +177,7 @@ private: bool m_Force = false; bool m_Async = false; bool m_IgnoreMissingAttachments = false; + bool m_Clean = false; std::string m_CloudUrl; std::string m_CloudNamespace; @@ -191,7 +192,6 @@ private: std::string m_ZenUrl; std::string m_ZenProjectName; std::string m_ZenOplogName; - bool m_ZenClean; std::string m_FileDirectoryPath; std::string m_FileName; |