summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCVS.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-25 19:42:45 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-25 19:42:45 (GMT)
commit80282b749fb138ea8bd188dd5b7623c7545ea927 (patch)
treea654e1b28bf2b2bec97de9ee7dad695d322598f1 /Source/CTest/cmCTestCVS.h
parentcb788e8f6dfeeb5a934679f671adc87116837834 (diff)
downloadCMake-80282b749fb138ea8bd188dd5b7623c7545ea927.zip
CMake-80282b749fb138ea8bd188dd5b7623c7545ea927.tar.gz
CMake-80282b749fb138ea8bd188dd5b7623c7545ea927.tar.bz2
ENH: Rewrite CTest Update implementation
This adds a new VCS update implementation to the cmCTestVC hierarchy and removes it from cmCTestUpdateHandler. The new implementation has the following advantages: - Factorized implementation instead of monolithic function - Logs vcs tool output as it is parsed (less memory, inline messages) - Uses one global svn log instead of one log per file - Reports changes on cvs branches (instead of latest trunk change) - Generates simpler Update.xml (only one Directory element per dir) Shared components of the new implementation appear in cmCTestVC and may be re-used by subclasses for other VCS tools in the future.
Diffstat (limited to 'Source/CTest/cmCTestCVS.h')
-rw-r--r--Source/CTest/cmCTestCVS.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestCVS.h b/Source/CTest/cmCTestCVS.h
index f5175c2..c5f87b9 100644
--- a/Source/CTest/cmCTestCVS.h
+++ b/Source/CTest/cmCTestCVS.h
@@ -30,6 +30,27 @@ public:
cmCTestCVS(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestCVS();
+
+private:
+ // Implement cmCTestVC internal API.
+ virtual bool UpdateImpl();
+ virtual bool WriteXMLUpdates(std::ostream& xml);
+
+ // Update status for files in each directory.
+ class Directory: public std::map<cmStdString, PathStatus> {};
+ std::map<cmStdString, Directory> Dirs;
+
+ std::string ComputeBranchFlag(std::string const& dir);
+ void LoadRevisions(std::string const& file, const char* branchFlag,
+ std::vector<Revision>& revisions);
+ void WriteXMLDirectory(std::ostream& xml, std::string const& path,
+ Directory const& dir);
+
+ // Parsing helper classes.
+ class UpdateParser;
+ class LogParser;
+ friend class UpdateParser;
+ friend class LogParser;
};
#endif