Skip to content

control history tagging per project #4794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vladak
Copy link
Member

@vladak vladak commented Jun 4, 2025

This change introduces the tagsEnabled per project/repository tunable that allows to control whether tags should be applied to history entries (so that they are visible in history view).

This will require a change to https://github.com/oracle/opengrok/wiki/Per-project-configuration

Tested with the indexer running with:

-s
/var/opengrok/src
-d
/var/opengrok/data
-P
-H
-S
-c
/opt/homebrew/bin/ctags
-R
/var/opengrok/etc/ro-config-project.xml
-W
/var/opengrok/etc/configuration.xml

and the /var/opengrok/etc/ro-config-project.xml overriding the tagsEnabled:

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_121" class="java.beans.XMLDecoder">
 <object class="org.opengrok.indexer.configuration.Configuration">

  <void property="projects">
   <void method="put">
    <string>Lucene</string>
    <object class="org.opengrok.indexer.configuration.Project">
     <void property="handleRenamedFiles">
      <boolean>true</boolean>
     </void>
     <void property="historyEnabled">
      <boolean>true</boolean>
     </void>
     <void property="tagsEnabled">
      <boolean>true</boolean>
     </void>
     <void property="mergeCommitsEnabled">
      <boolean>true</boolean>
     </void>
     <void property="name">
      <string>Lucene</string>
     </void>
     <void property="path">
      <string>/Lucene</string>
     </void>
    </object>
   </void>
  </void>

 </object>
</java>

Then after the indexing is done, check that the history view contains list of tags.

The indexer log entry relevant to the repository:

INFO: Creating history cache for {dir='/private/var/opengrok/src/Lucene',type=git,history=on,historyCache=on,renamed=true,merge=true,annotationCache=off,tagsEnabled=on}
Jun 04, 2025 3:00:10 PM org.opengrok.indexer.history.HistoryGuru createHistoryCache

@vladak vladak added the indexer label Jun 4, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 4, 2025
@vladak vladak force-pushed the tags_enabled_per_project branch from 6908b9e to 57c0c6c Compare June 4, 2025 12:29
@vladak vladak requested a review from ginoaugustine June 4, 2025 13:01
@vladak vladak changed the title control tags enabled per project control history tagging per project Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexer OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant