opengrok
opengrok copied to clipboard
Turning on renamed history does not do the renamed history
It maybe a misconfiguration, but when I turned on history of renamed files
2019-01-04 04:37:13.478-0500 INFO t1 Indexer.parseOptions: Indexer options: [-R, /tmp/tmphqypbapm, -U, http://localhost:8080/source, --renamedHistory, on, -A, .pp:Ruby, -r, dirbased, --memory, 256, -c, /opt/univer
sal_ctags/bin/ctags, -i, Assets.webtest, -P, -H, project]
But the history cache reports it does not use renamed history:
2019-01-04 04:37:18.431-0500 INFO t1 Indexer.prepareIndexer: Generating history cache for repositories: /project
2019-01-04 04:37:18.433-0500 INFO t1 HistoryGuru.createCacheReal: Creating historycache for 1 repositories
2019-01-04 04:37:18.443-0500 INFO t23 HistoryGuru.createCache: Creating historycache for /src/project (GitRepository) without renamed file handling
-R, /tmp/tmphqypbapm
This file is produced with reindex-project python script, so it contains the webapp configuration.
Steps to produce this were:
- having a working instance without renamed files (for a day at least)
- turning on renamed files in reindex-project configuration
- running the opengrok-sync to run the reindex
This is the project from webapp config:
<object class="org.opengrok.indexer.configuration.Project">
<void property="historyEnabled">
<boolean>true</boolean>
</void>
<void property="indexed">
<boolean>true</boolean>
</void>
<void property="name">
<string>project</string>
</void>
<void property="path">
<string>/project</string>
</void>
</object>
This is the repository info from webapp config:
<object class="org.opengrok.indexer.history.RepositoryInfo">
<void property="branch">
<string>master</string>
</void>
<void property="currentVersion">
<string>2018-01-03 13:03 -0500 xxxxxx some super text</string>
</void>
<void property="datePatterns">
<array class="java.lang.String" length="1">
<void index="0">
<string>yyyy-MM-dd'T'HH:mm:ssXXX</string>
</void>
</array>
</void>
<void property="directoryNameRelative">
<string>/project</string>
</void>
<void property="parent">
<string>ssh://url</string>
</void>
<void property="type">
<string>git</string>
</void>
</object>
My hunch is that it depends on how the project/repository was added into the configuration.
- source code cloned to srcroot
- projadm add project to webapp
- run opengrok-sync for the project