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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,18 +9,12 @@
namespace DB namespace DB
{ {
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
class CommandWrite final : public ICommand class CommandWrite final : public ICommand
{ {
public: public:
CommandWrite() CommandWrite()
{ {
command_name = "write"; command_name = "write";
// command_option_description.emplace(createOptionsDescription("Allowed options", getTerminalWidth()));
description = "Write a file from `FROM_PATH` to `TO_PATH`"; 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`")( 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)"); "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("mkdir", makeCommandMkDir());
command_descriptions.emplace("switch-disk", makeCommandSwitchDisk()); command_descriptions.emplace("switch-disk", makeCommandSwitchDisk());
#ifdef CLICKHOUSE_CLOUD #ifdef CLICKHOUSE_CLOUD
// command_descriptions.emplace("packed-io", makeCommandPackedIO()); command_descriptions.emplace("packed-io", makeCommandPackedIO());
#endif #endif
} }

View File

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

View File

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