cmCTestGIT.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 cmCTestGIT_h
  11. #define cmCTestGIT_h
  12. #include "cmCTestGlobalVC.h"
  13. /** \class cmCTestGIT
  14. * \brief Interaction with git command-line tool
  15. *
  16. */
  17. class cmCTestGIT: public cmCTestGlobalVC
  18. {
  19. public:
  20. /** Construct with a CTest instance and update log stream. */
  21. cmCTestGIT(cmCTest* ctest, std::ostream& log);
  22. virtual ~cmCTestGIT();
  23. private:
  24. unsigned int CurrentGitVersion;
  25. unsigned int GetGitVersion();
  26. std::string GetWorkingRevision();
  27. virtual void NoteOldRevision();
  28. virtual void NoteNewRevision();
  29. virtual bool UpdateImpl();
  30. std::string FindGitDir();
  31. std::string FindTopDir();
  32. bool UpdateByFetchAndReset();
  33. bool UpdateByCustom(std::string const& custom);
  34. bool UpdateInternal();
  35. void LoadRevisions();
  36. void LoadModifications();
  37. public: // needed by older Sun compilers
  38. // Parsing helper classes.
  39. class OneLineParser;
  40. class DiffParser;
  41. class CommitParser;
  42. friend class OneLineParser;
  43. friend class DiffParser;
  44. friend class CommitParser;
  45. };
  46. #endif