summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestGIT.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-04-22 13:19:06 (GMT)
committerBrad King <brad.king@kitware.com>2009-04-22 13:19:06 (GMT)
commit9c17cbeb44f4e47dd8f6a2cda57c3967b293cdfe (patch)
treef31f0e20ee3c74d471870b83e571c70c45ef6141 /Source/CTest/cmCTestGIT.h
parentd25289ad9254c67d8231c6582b4b9a35daa8297c (diff)
downloadCMake-9c17cbeb44f4e47dd8f6a2cda57c3967b293cdfe.zip
CMake-9c17cbeb44f4e47dd8f6a2cda57c3967b293cdfe.tar.gz
CMake-9c17cbeb44f4e47dd8f6a2cda57c3967b293cdfe.tar.bz2
ENH: Teach CTest to handle git repositories
This creates cmCTestGIT to drive CTest Update handling on git-based work trees. Currently we always update to the head of the remote tracking branch (git pull), so the nightly start time is ignored for Nightly builds. A later change will address this. See issue #6994.
Diffstat (limited to 'Source/CTest/cmCTestGIT.h')
-rw-r--r--Source/CTest/cmCTestGIT.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestGIT.h b/Source/CTest/cmCTestGIT.h
new file mode 100644
index 0000000..28ae91b
--- /dev/null
+++ b/Source/CTest/cmCTestGIT.h
@@ -0,0 +1,52 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef cmCTestGIT_h
+#define cmCTestGIT_h
+
+#include "cmCTestGlobalVC.h"
+
+/** \class cmCTestGIT
+ * \brief Interaction with git command-line tool
+ *
+ */
+class cmCTestGIT: public cmCTestGlobalVC
+{
+public:
+ /** Construct with a CTest instance and update log stream. */
+ cmCTestGIT(cmCTest* ctest, std::ostream& log);
+
+ virtual ~cmCTestGIT();
+
+private:
+ std::string GetWorkingRevision();
+ virtual void NoteOldRevision();
+ virtual void NoteNewRevision();
+ virtual bool UpdateImpl();
+
+ void LoadRevisions();
+ void LoadModifications();
+
+ // Parsing helper classes.
+ class OneLineParser;
+ class DiffParser;
+ class CommitParser;
+ friend class OneLineParser;
+ friend class DiffParser;
+ friend class CommitParser;
+};
+
+#endif