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