cmCTestGIT.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. public:
  39. // Parsing helper classes.
  40. class OneLineParser;
  41. class DiffParser;
  42. class CommitParser;
  43. friend class OneLineParser;
  44. friend class DiffParser;
  45. friend class CommitParser;
  46. };
  47. #endif