oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

Perforce history indexer not picking up file content (can't diff or annotate) (Bugzilla #3969) #345

Open vladak opened 11 years ago

vladak commented 11 years ago

status INCOMPLETE severity normal in component indexer for --- Reported in version unspecified on platform i86pc/amd64 Assigned to: Trond Norbye

Original attachment names and IDs:

On 2008-10-15 18:43:17 +0000, Matthew Janulewicz wrote:

Created attachment 580 Example historycache file.

I have the Perforce history indexer scanning fine but it only seems to be picking up the metadata about the changes, not the content of the file itself.

Therefore the history pane works but the annotate and diff functions do not.

When I go to annotate I have a column with line numbers, two blank columns, then the file content.

In the history view the revisions and numbers are listed correctly along with the author, date and checkin comment. However, when I click on any of the file revision numbers the result is a blank file. Therefore, any time I try to diff any revisions they come back as identical.

This is the entire commandline I am using to create the index:

java -jar opengrok.jar -v -c c:\ctags\ctags.exe -W d:\opengrok7\data\configuration.xml -P -H -w /source7 -S -s d:\mjanulewicz_code_windows -d d:\opengrok7\data

Note that (obviously) I am running this on Windows with a Tomcat app server.

This is the output I get from the commandline:

Scanning for repositories... Oct 15, 2008 6:23:52 PM org.opensolaris.opengrok.history.HistoryGuru addRepositories INFO: Adding repository: <D:\mjanulewicz_code_windows\lal> Done searching for repositories (45s) Writing configuration to d:\opengrok7\data\configuration.xml Done... Oct 15, 2008 6:23:52 PM org.opensolaris.opengrok.history.HistoryGuru createCache INFO: Create historycache for D:\mjanulewicz_code_windows\lal (PerforceRepository) Oct 15, 2008 6:23:53 PM org.opensolaris.opengrok.history.HistoryGuru createCache INFO: Creating historycache for D:\mjanulewicz_code_windows\lal took (906ms) Oct 15, 2008 6:23:53 PM org.opensolaris.opengrok.index.Indexer doIndexerExecution INFO: Starting indexExecution Adding: /lal/main/cw/gfx/bin/exrdod/exrdod.cpp (CAnalyzer)

D:\opengrok7>

This is my resultant configuration.xml file (sorry, this won't let me attach more than one file):

<?xml version="1.0" encoding="UTF-8"?>

c:\ctags\ctags.exe D:\opengrok7\data lal /lal D:\mjanulewicz_code_windows\lal D:\mjanulewicz_code_windows\lal D:\mjanulewicz_code_windows /source7/s? true

Attached is the historycache .gz file that corresponds to the one file I am testing this on.

On 2008-10-15 18:55:45 +0000, Trond Norbye wrote:

Could you post the web.xml in the source.war you are using?

On 2008-10-16 14:46:26 +0000, Matthew Janulewicz wrote:

Created attachment 592 My web.xml file

tarzanek commented 11 years ago

att 592:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <display-name>OpenGrok</display-name>
  <description>A wicked fast source browser</description>

  <!-- 
       You may either use a configuration file, or just specify your
       data-root and source root. If CONFIGURATION is specified, it will
       override the values set in DATA_ROOT and SRC_ROOT.
  -->

  <context-param>
    <param-name>CONFIGURATION</param-name>
    <param-value>d:\opengrok7\data\configuration.xml</param-value>
    <description>Full path to the configuration file where OpenGrok can read it's configuration</description>
  </context-param>

  <context-param>
    <param-name>ConfigAddress</param-name>
    <param-value>localhost:2424</param-value>
    <description>An address where OpenGrok can receive new configuration</description>
  </context-param>

  <!-- context-param>
    <param-name>DATA_ROOT</param-name>
    <param-value>d:\opengrok7\data</param-value>
    <description>REQUIRED: Full path of the directory where data files generated by OpenGrok are stored</description>
  </context-param>

  <context-param>
    <param-name>SRC_ROOT</param-name>
    <param-value>d:\mjanulewicz_code_windows</param-value>
    <description>REQUIRED: Full path to source tree</description>
  </context-param-->

  <listener>
   <listener-class>org.opensolaris.opengrok.web.WebappListener</listener-class>
  </listener>

    <servlet>
    <servlet-name>search</servlet-name>
    <display-name>Source Finder</display-name>
    <jsp-file>/search.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>history</servlet-name>
    <display-name>Source History</display-name>
    <jsp-file>/history.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>lister</servlet-name>
    <display-name>Source lister</display-name>
    <jsp-file>/list.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>diff</servlet-name>
    <display-name>Source diffs between revisions</display-name>
    <jsp-file>/diff.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>more</servlet-name>
    <display-name>Shows more matching lines</display-name>
    <jsp-file>/more.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>rss</servlet-name>
    <display-name>Source Changes in RSS format</display-name>
    <jsp-file>/rss.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>raw</servlet-name>
    <display-name>Raw Source lister</display-name>
    <jsp-file>/raw.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>error</servlet-name>
    <display-name>Error Handler</display-name>
    <jsp-file>/error.jsp</jsp-file>
  </servlet>
  <servlet>
    <servlet-name>enoent</servlet-name>
    <display-name>File not found handler</display-name>
    <jsp-file>/enoent.jsp</jsp-file>
  </servlet>
  <servlet-mapping>
    <servlet-name>search</servlet-name>
    <url-pattern>/search</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>history</servlet-name>
    <url-pattern>/history/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>lister</servlet-name>
    <url-pattern>/xref/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>raw</servlet-name>
    <url-pattern>/raw/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>search</servlet-name>
    <url-pattern>/s</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>diff</servlet-name>
    <url-pattern>/diff/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>more</servlet-name>
    <url-pattern>/more/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>rss</servlet-name>
    <url-pattern>/rss/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>error</servlet-name>
    <url-pattern>/error</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>enoent</servlet-name>
    <url-pattern>/enoent</url-pattern>
  </servlet-mapping>
  <error-page>
    <error-code>404</error-code>
    <location>/enoent</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/error</location>
  </error-page>
</web-app>
tarzanek commented 11 years ago

att 580 (zip file, base64 encoded):

H4sIAAAAAAAAAO2STWvcMBCGz82vGHRO5XXYLA3IGwpJSCGFHloovRTZnvUqK2uMpDVxf33H6/1y
mtA09FKoL5Zm3nn0ajTq8qG20KIPhlwmUjkRgK6g0rgqE18+37x9Jy7ncKLudauPdedy8j1NBRRW
h5CJPi1z1C7Irx/vrpAJ6AUXgqL8Hou4E5KvJDXoAlntTdisK08ruTQhku/k7fDf1IJqyZTQeFb5
2GViK7p20RsMg+bxCRsr62isfO+97u64ZCvc4mqMSyozoctyl3ity95It4f8YlcX0bR4yIPKiSx3
aR79GlWy2+3rkx7wPG7Nxv0xLnAfXDUPjfYr9CrZ7l/IK3UcmXuuj1djHShLfEiaXkzT84vZpP9U
sokdWMkAe6mVGkPQFT5xN34lZCU1bIzqWrvSGofAe57EAAvyfbzxDODAKbBhhGB+4Cmwth/ZnIKJ
nTx5w9R9Fkpc6LWNASLBbPowmw6CI9ZI8u3DJ8gtFatBtseORLRYyD99BI+t6U974upnv2E9avIo
+X/U/71RN85Eoy0USyxWxv3NUUpfP0qj1CFxFFZJ30Be/ATDAfM2TgYAAA==