summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestHG.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-15 18:58:40 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-16 18:19:26 (GMT)
commitef399f9bc6b8e2ff917a5f2809346fb81fd954ae (patch)
tree329a270ad32f04ebba493ea9abe5486fd74898a1 /Source/CTest/cmCTestHG.cxx
parentbb4730dc5add8c5ac54b41efa5375189636429f3 (diff)
downloadCMake-ef399f9bc6b8e2ff917a5f2809346fb81fd954ae.zip
CMake-ef399f9bc6b8e2ff917a5f2809346fb81fd954ae.tar.gz
CMake-ef399f9bc6b8e2ff917a5f2809346fb81fd954ae.tar.bz2
ctest_update: Refactor internal APIs to support more failure cases
Thread failure of VC tool commands through more APIs so that we can detect when they fail. Defer updating of the individual VC tool usage the future and just return true from them for now.
Diffstat (limited to 'Source/CTest/cmCTestHG.cxx')
-rw-r--r--Source/CTest/cmCTestHG.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index 8443c93..68ebd37 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -104,19 +104,21 @@ std::string cmCTestHG::GetWorkingRevision()
return rev;
}
-void cmCTestHG::NoteOldRevision()
+bool cmCTestHG::NoteOldRevision()
{
this->OldRevision = this->GetWorkingRevision();
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
<< this->OldRevision << "\n");
this->PriorRev.Rev = this->OldRevision;
+ return true;
}
-void cmCTestHG::NoteNewRevision()
+bool cmCTestHG::NoteNewRevision()
{
this->NewRevision = this->GetWorkingRevision();
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
<< this->NewRevision << "\n");
+ return true;
}
bool cmCTestHG::UpdateImpl()
@@ -262,7 +264,7 @@ private:
}
};
-void cmCTestHG::LoadRevisions()
+bool cmCTestHG::LoadRevisions()
{
// Use 'hg log' to get revisions in a xml format.
//
@@ -293,9 +295,10 @@ void cmCTestHG::LoadRevisions()
OutputLogger err(this->Log, "log-err> ");
this->RunChild(hg_log, &out, &err);
out.Process("</log>\n");
+ return true;
}
-void cmCTestHG::LoadModifications()
+bool cmCTestHG::LoadModifications()
{
// Use 'hg status' to get modified files.
const char* hg = this->CommandLineTool.c_str();
@@ -303,4 +306,5 @@ void cmCTestHG::LoadModifications()
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(hg_status, &out, &err);
+ return true;
}