2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc.
|
2009-02-24 18:39:55 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2009-02-24 18:39:55 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2009-02-24 18:39:55 +03:00
|
|
|
#ifndef cmCTestCVS_h
|
|
|
|
#define cmCTestCVS_h
|
|
|
|
|
2016-08-24 23:01:40 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2009-02-24 18:39:55 +03:00
|
|
|
#include "cmCTestVC.h"
|
|
|
|
|
2016-08-24 23:01:40 +03:00
|
|
|
#include <iosfwd>
|
2016-08-24 01:29:15 +03:00
|
|
|
#include <map>
|
2016-08-24 23:01:40 +03:00
|
|
|
#include <string>
|
2016-08-24 01:29:15 +03:00
|
|
|
#include <vector>
|
|
|
|
|
2016-08-24 23:01:40 +03:00
|
|
|
class cmCTest;
|
|
|
|
class cmXMLWriter;
|
|
|
|
|
2009-02-24 18:39:55 +03:00
|
|
|
/** \class cmCTestCVS
|
|
|
|
* \brief Interaction with cvs command-line tool
|
|
|
|
*
|
|
|
|
*/
|
2016-05-16 17:34:04 +03:00
|
|
|
class cmCTestCVS : public cmCTestVC
|
2009-02-24 18:39:55 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** Construct with a CTest instance and update log stream. */
|
|
|
|
cmCTestCVS(cmCTest* ctest, std::ostream& log);
|
|
|
|
|
2016-06-27 22:25:27 +03:00
|
|
|
~cmCTestCVS() CM_OVERRIDE;
|
2009-02-25 22:42:45 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Implement cmCTestVC internal API.
|
2016-06-27 22:25:27 +03:00
|
|
|
bool UpdateImpl() CM_OVERRIDE;
|
|
|
|
bool WriteXMLUpdates(cmXMLWriter& xml) CM_OVERRIDE;
|
2009-02-25 22:42:45 +03:00
|
|
|
|
|
|
|
// Update status for files in each directory.
|
2016-05-16 17:34:04 +03:00
|
|
|
class Directory : public std::map<std::string, PathStatus>
|
|
|
|
{
|
|
|
|
};
|
2014-02-10 09:21:34 +04:00
|
|
|
std::map<std::string, Directory> Dirs;
|
2009-02-25 22:42:45 +03:00
|
|
|
|
|
|
|
std::string ComputeBranchFlag(std::string const& dir);
|
|
|
|
void LoadRevisions(std::string const& file, const char* branchFlag,
|
|
|
|
std::vector<Revision>& revisions);
|
2015-05-24 01:33:24 +03:00
|
|
|
void WriteXMLDirectory(cmXMLWriter& xml, std::string const& path,
|
2009-02-25 22:42:45 +03:00
|
|
|
Directory const& dir);
|
|
|
|
|
|
|
|
// Parsing helper classes.
|
|
|
|
class LogParser;
|
2016-08-24 23:01:40 +03:00
|
|
|
class UpdateParser;
|
|
|
|
|
2009-02-25 22:42:45 +03:00
|
|
|
friend class LogParser;
|
2016-08-24 23:01:40 +03:00
|
|
|
friend class UpdateParser;
|
2009-02-24 18:39:55 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|