summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCVS.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestCVS.cxx')
-rw-r--r--Source/CTest/cmCTestCVS.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
index 95e898c..badd43e 100644
--- a/Source/CTest/cmCTestCVS.cxx
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -5,6 +5,7 @@
#include <utility>
#include <cm/string_view>
+#include <cmext/algorithm>
#include "cmsys/FStream.hxx"
#include "cmsys/RegularExpression.hxx"
@@ -89,18 +90,15 @@ bool cmCTestCVS::UpdateImpl()
}
// Run "cvs update" to update the work tree.
- std::vector<char const*> cvs_update;
- cvs_update.push_back(this->CommandLineTool.c_str());
- cvs_update.push_back("-z3");
- cvs_update.push_back("update");
- for (std::string const& arg : args) {
- cvs_update.push_back(arg.c_str());
- }
- cvs_update.push_back(nullptr);
+ std::vector<std::string> cvs_update;
+ cvs_update.push_back(this->CommandLineTool);
+ cvs_update.emplace_back("-z3");
+ cvs_update.emplace_back("update");
+ cm::append(cvs_update, args);
UpdateParser out(this, "up-out> ");
UpdateParser err(this, "up-err> ");
- return this->RunUpdateCommand(cvs_update.data(), &out, &err);
+ return this->RunUpdateCommand(cvs_update, &out, &err);
}
class cmCTestCVS::LogParser : public cmCTestVC::LineParser
@@ -221,10 +219,8 @@ void cmCTestCVS::LoadRevisions(std::string const& file, const char* branchFlag,
cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush);
// Run "cvs log" to get revisions of this file on this branch.
- const char* cvs = this->CommandLineTool.c_str();
- const char* cvs_log[] = {
- cvs, "log", "-N", branchFlag, file.c_str(), nullptr
- };
+ std::string cvs = this->CommandLineTool;
+ std::vector<std::string> cvs_log = { cvs, "log", "-N", branchFlag, file };
LogParser out(this, "log-out> ", revisions);
OutputLogger err(this->Log, "log-err> ");