D24641: Collect more information from version control systems

Thomas Fischer noreply at phabricator.kde.org
Sun Nov 3 18:16:37 GMT 2019


thomasfischer updated this revision to Diff 69225.
thomasfischer added a comment.


  I updated the diff. I was quite surprised about the time it takes to compute the number of commits (26 seconds), thus I removed this functionality completely. As of now, only 'revision' and 'branch' are queried for.
  There are three functions now:
  
  - `ecm_source_version_control_probe_revison` retrieves the source directory's Git revision and stores it in `ECM_SOURCE_VERSION_CONTROL_REVISION`. A check is made to return immediately if the revision got retrieved earlier. The Git executable is only searched for once, the path is stored in the private variable `_ECM_SOURCE_VERSION_GIT_EXECUTABLE`. Two warnings may be shown if source directory is either not under version control or the version control system is not Git. Private boolean variables are used to supress showing the same warning again once `ecm_source_version_control_probe_branch` (see below) gets invoked.
  - `ecm_source_version_control_probe_branch` is very similar to the function above, except for that it retrieves the branch and stores it in `ECM_SOURCE_VERSION_CONTROL_BRANCH`.
  - `ecm_source_version_control_status` will print out a status line about the current Git revision and branch. Invoking this function is optional. The function will invoke `ecm_source_version_control_probe_revison` and `ecm_source_version_control_probe_branch` to retrieve the necessary data. Nothing will be printed if no revision and no branch are known.

REPOSITORY
  R240 Extra CMake Modules

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24641?vs=68072&id=69225

REVISION DETAIL
  https://phabricator.kde.org/D24641

AFFECTED FILES
  modules/ECMSourceVersionControl.cmake

To: thomasfischer, sitter, kossebau
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20191103/4a7a0fd3/attachment.html>


More information about the Kde-buildsystem mailing list