cmCTestSVN.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCTestSVN_h
  11. #define cmCTestSVN_h
  12. #include "cmCTestGlobalVC.h"
  13. /** \class cmCTestSVN
  14. * \brief Interaction with subversion command-line tool
  15. *
  16. */
  17. class cmCTestSVN: public cmCTestGlobalVC
  18. {
  19. public:
  20. /** Construct with a CTest instance and update log stream. */
  21. cmCTestSVN(cmCTest* ctest, std::ostream& log);
  22. virtual ~cmCTestSVN();
  23. private:
  24. // Implement cmCTestVC internal API.
  25. virtual void CleanupImpl();
  26. virtual void NoteOldRevision();
  27. virtual void NoteNewRevision();
  28. virtual bool UpdateImpl();
  29. // URL of repository directory checked out in the working tree.
  30. std::string URL;
  31. // URL of repository root directory.
  32. std::string Root;
  33. // Directory under repository root checked out in working tree.
  34. std::string Base;
  35. std::string LoadInfo();
  36. void LoadModifications();
  37. void LoadRevisions();
  38. void GuessBase(std::vector<Change> const& changes);
  39. const char* LocalPath(std::string const& path);
  40. void DoRevision(Revision const& revision,
  41. std::vector<Change> const& changes);
  42. // Parsing helper classes.
  43. class InfoParser;
  44. class LogParser;
  45. class StatusParser;
  46. class UpdateParser;
  47. friend class InfoParser;
  48. friend class LogParser;
  49. friend class StatusParser;
  50. friend class UpdateParser;
  51. };
  52. #endif