2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc.
|
2009-04-22 17:18:19 +04: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-04-22 17:18:19 +04: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-04-22 17:18:19 +04:00
|
|
|
#ifndef cmCTestGlobalVC_h
|
|
|
|
#define cmCTestGlobalVC_h
|
|
|
|
|
|
|
|
#include "cmCTestVC.h"
|
|
|
|
|
2015-01-12 23:17:55 +03:00
|
|
|
#include <list>
|
|
|
|
|
2009-04-22 17:18:19 +04:00
|
|
|
/** \class cmCTestGlobalVC
|
|
|
|
* \brief Base class for handling globally-versioned trees
|
|
|
|
*
|
|
|
|
*/
|
2016-05-16 17:34:04 +03:00
|
|
|
class cmCTestGlobalVC : public cmCTestVC
|
2009-04-22 17:18:19 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** Construct with a CTest instance and update log stream. */
|
|
|
|
cmCTestGlobalVC(cmCTest* ctest, std::ostream& log);
|
|
|
|
|
|
|
|
virtual ~cmCTestGlobalVC();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Implement cmCTestVC internal API.
|
2015-05-24 01:33:24 +03:00
|
|
|
virtual bool WriteXMLUpdates(cmXMLWriter& xml);
|
2009-04-22 17:18:19 +04:00
|
|
|
|
|
|
|
/** Represent a vcs-reported action for one path in a revision. */
|
|
|
|
struct Change
|
|
|
|
{
|
|
|
|
char Action;
|
|
|
|
std::string Path;
|
2016-05-16 17:34:04 +03:00
|
|
|
Change(char a = '?')
|
|
|
|
: Action(a)
|
|
|
|
{
|
|
|
|
}
|
2009-04-22 17:18:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// Update status for files in each directory.
|
2016-05-16 17:34:04 +03:00
|
|
|
class Directory : public std::map<std::string, File>
|
|
|
|
{
|
|
|
|
};
|
2014-02-10 09:21:34 +04:00
|
|
|
std::map<std::string, Directory> Dirs;
|
2009-04-22 17:18:19 +04:00
|
|
|
|
|
|
|
// Old and new repository revisions.
|
|
|
|
std::string OldRevision;
|
|
|
|
std::string NewRevision;
|
|
|
|
|
|
|
|
// Information known about old revision.
|
|
|
|
Revision PriorRev;
|
|
|
|
|
|
|
|
// Information about revisions from a svn log.
|
|
|
|
std::list<Revision> Revisions;
|
|
|
|
|
|
|
|
virtual const char* LocalPath(std::string const& path);
|
|
|
|
|
|
|
|
virtual void DoRevision(Revision const& revision,
|
|
|
|
std::vector<Change> const& changes);
|
|
|
|
virtual void DoModification(PathStatus status, std::string const& path);
|
|
|
|
virtual void LoadModifications() = 0;
|
|
|
|
virtual void LoadRevisions() = 0;
|
|
|
|
|
2015-05-24 01:33:24 +03:00
|
|
|
virtual void WriteXMLGlobal(cmXMLWriter& xml);
|
|
|
|
void WriteXMLDirectory(cmXMLWriter& xml, std::string const& path,
|
2009-04-22 17:18:19 +04:00
|
|
|
Directory const& dir);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|