Remove comments

This commit is contained in:
divanik 2024-05-27 12:17:04 +00:00
parent 90365ef0a6
commit 846d46075d
14 changed files with 8 additions and 63 deletions

View File

@ -8,11 +8,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandChangeDirectory final : public ICommand
{
public:
@ -28,9 +23,7 @@ public:
void executeImpl(const CommandLineOptions & options, DisksClient & client) override
{
DiskWithPath & disk = getDiskWithPath(client, options, "disk");
// std::cerr << "Disk name: " << disk.getDisk()->getName() << std::endl;
String path = getValueFromCommandLineOptionsThrow<String>(options, "path");
// std::cerr << "Disk path: " << path << std::endl;
disk.setPath(path);
}
};

View File

@ -6,11 +6,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandCopy final : public ICommand
{
public:

View File

@ -4,11 +4,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandLink final : public ICommand
{
public:

View File

@ -7,11 +7,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandList final : public ICommand
{
public:

View File

@ -7,11 +7,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandListDisks final : public ICommand
{
public:

View File

@ -6,11 +6,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandMkDir final : public ICommand
{
public:

View File

@ -4,11 +4,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandMove final : public ICommand
{
public:

View File

@ -8,18 +8,12 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandRead final : public ICommand
{
public:
CommandRead()
{
command_name = "read";
// command_option_description.emplace(createOptionsDescription("Allowed options", getTerminalWidth()));
description = "Read a file from `FROM_PATH` to `TO_PATH`";
options_description.add_options()(
"path-from", po::value<String>(), "file from which we are reading, defaults to `stdin` (mandatory, positional)")(

View File

@ -4,11 +4,6 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandRemove final : public ICommand
{
public:

View File

@ -8,20 +8,13 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandSwitchDisk final : public ICommand
{
public:
explicit CommandSwitchDisk() : ICommand()
{
command_name = "switch-disk";
// options_description.emplace(createOptionsDescription("Allowed options", getTerminalWidth()));
description = "Change disk";
// options_description->add_options()("recursive", "recursively list all directories");
options_description.add_options()("disk", po::value<String>(), "the disk to switch to (mandatory, positional)")(
"path", po::value<String>(), "the path to switch on the disk");
positional_options_description.add("disk", 1);

View File

@ -9,18 +9,12 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandWrite final : public ICommand
{
public:
CommandWrite()
{
command_name = "write";
// command_option_description.emplace(createOptionsDescription("Allowed options", getTerminalWidth()));
description = "Write a file from `FROM_PATH` to `TO_PATH`";
options_description.add_options()("path-from", po::value<String>(), "file from which we are reading, defaults to `stdin`")(
"path-to", po::value<String>(), "file to which we are writing (mandatory, positional)");

View File

@ -257,7 +257,7 @@ void DisksApp::addOptions()
command_descriptions.emplace("mkdir", makeCommandMkDir());
command_descriptions.emplace("switch-disk", makeCommandSwitchDisk());
#ifdef CLICKHOUSE_CLOUD
// command_descriptions.emplace("packed-io", makeCommandPackedIO());
command_descriptions.emplace("packed-io", makeCommandPackedIO());
#endif
}

View File

@ -15,6 +15,12 @@
namespace DB
{
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
extern const int LOGICAL_ERROR;
};
using ProgramOptionsDescription = boost::program_options::options_description;
using CommandLineOptions = boost::program_options::variables_map;

View File

@ -24,7 +24,6 @@ namespace fs = std::filesystem;
namespace DB
{
std::vector<String> split(const String & text, const String & delimiters);
using ProgramOptionsDescription = boost::program_options::options_description;
@ -34,6 +33,7 @@ using CommandLineOptions = boost::program_options::variables_map;
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
extern const int LOGICAL_ERROR;
};
class DiskWithPath