opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

Turning on renamed history does not do the renamed history

Open tulinkry opened this issue 6 years ago • 5 comments

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

tulinkry avatar Jan 04 '19 09:01 tulinkry

-R, /tmp/tmphqypbapm

This file is produced with reindex-project python script, so it contains the webapp configuration.

tulinkry avatar Jan 04 '19 09:01 tulinkry

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

tulinkry avatar Jan 04 '19 10:01 tulinkry

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&apos;T&apos;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>

tulinkry avatar Jan 04 '19 10:01 tulinkry

My hunch is that it depends on how the project/repository was added into the configuration.

vladak avatar Jan 04 '19 15:01 vladak

  1. source code cloned to srcroot
  2. projadm add project to webapp
  3. run opengrok-sync for the project

tulinkry avatar Jan 05 '19 10:01 tulinkry