<table><tr><td style="">thomasfischer updated this revision to Diff 69225.<br />thomasfischer added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24641">View Revision</a></tr></table><br /><div><div><p>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.<br />
There are three functions now:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">ecm_source_version_control_probe_revison</tt> retrieves the source directory's Git revision and stores it in <tt style="background: #ebebeb; font-size: 13px;">ECM_SOURCE_VERSION_CONTROL_REVISION</tt>. 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 <tt style="background: #ebebeb; font-size: 13px;">_ECM_SOURCE_VERSION_GIT_EXECUTABLE</tt>. 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 <tt style="background: #ebebeb; font-size: 13px;">ecm_source_version_control_probe_branch</tt> (see below) gets invoked.</li>
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">ecm_source_version_control_probe_branch</tt> is very similar to the function above, except for that it retrieves the branch and stores it in <tt style="background: #ebebeb; font-size: 13px;">ECM_SOURCE_VERSION_CONTROL_BRANCH</tt>.</li>
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">ecm_source_version_control_status</tt> will print out a status line about the current Git revision and branch. Invoking this function is optional. The function will invoke <tt style="background: #ebebeb; font-size: 13px;">ecm_source_version_control_probe_revison</tt> and <tt style="background: #ebebeb; font-size: 13px;">ecm_source_version_control_probe_branch</tt> to retrieve the necessary data. Nothing will be printed if no revision and no branch are known.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R240 Extra CMake Modules</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D24641?vs=68072&id=69225">https://phabricator.kde.org/D24641?vs=68072&id=69225</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24641">https://phabricator.kde.org/D24641</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>modules/ECMSourceVersionControl.cmake</div></div></div><br /><div><strong>To: </strong>thomasfischer, sitter, kossebau<br /><strong>Cc: </strong>kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns<br /></div>