[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensolaris-opengrok-discuss
Subject:    Re: [opengrok] opengrok history feature in clearcase
From:       Appu Mathew <deanstag () gmail ! com>
Date:       2012-10-04 16:15:58
Message-ID: CA+DdZVcDpZxzKAiWn991KNftGHz02P0gB5ADMivjtT39WPCf5Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


After copying the source.war it started working!
Thanks a lot.

Regards
Appu

On Thu, Oct 4, 2012 at 5:46 PM, Vladimir Kotal <vladimir.kotal@oracle.com>wrote:

> On 10/04/12 05:32, Appu Mathew wrote:
>
>> Hi Vladimir,
>>
>> I had the opengrok0.11 source and was tinkering around with it just before
>> your mail came. After i saw the mail, i removed the suspicious "-" from
>> the
>> version and added a normal hyphen, and built a new opengrok.jar. And ran
>> index again after removing all the data,log,etc folders just to be
>> sure.That seemed to work,atleast there are lotsof lshistory being executed
>> in the log files, and i can see the historycache now :) :)
>>
>
> Cool.
>
>
>  But  the history links are still not working. I went and checked and saw
>> that there is a gz file for that file in the historycache section, but the
>> history link is still deactivated. I cannot see the history link for any
>> file for that matter. Any clues?
>>
>
> The hasHistory() function in src/org/opensolaris/opengrok/**history/HistoryGuru.java
> determines whether the 'History' link will be shown (or just a text).
>
> It does this:
>
> 245    public boolean hasHistory(File file) {
> 246        Repository repos = getRepository(file);
> 247
> 248        return repos == null
> 249            ? false
> 250            : repos.isWorking() && repos.fileHasHistory(file)
> 251                && (RuntimeEnvironment.**getInstance().**
> isRemoteScmSupported()
> 252                    || !repos.isRemote());
> 253    }
>
> The repos.isWorking() should be satisfied by the '-version' check. The
> repos.fileHasHistory(file) should be true since there are gzip'ed files in
> the history directory.
>
> Not sure if Clearcase needs to query remote server to get the history but
> OpenGrok script enables it by default so it should work too.
>
> One thing to check - the source.war Java archive also contains
> opengrok.jar, so you might need to rebuild the archive too with the fixed
> version and deploy it.
>
>
>  I have not worked on java before much.Till yesterday, i did not know how
>> to
>> build the jar file from the source. I have figured that out now. So if u
>> need any info, i can add logs and check the execution flow.
>>
>
> You might want to add some debugging prints to the above function (or to
> mast.jsp where it calls 'cfg.hasHistory()') to see what parts of the
> predicate are actually true.
>
>
> v.
>

[Attachment #5 (text/html)]

After copying the source.war it started working!<br>Thanks a \
lot.<br><br>Regards<br>Appu<br><br><div class="gmail_quote">On Thu, Oct 4, 2012 at \
5:46 PM, Vladimir Kotal <span dir="ltr">&lt;<a \
href="mailto:vladimir.kotal@oracle.com" \
target="_blank">vladimir.kotal@oracle.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im">On 10/04/12 05:32, Appu Mathew wrote:<br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Hi Vladimir,<br>
<br>
I had the opengrok0.11 source and was tinkering around with it just before<br>
your mail came. After i saw the mail, i removed the suspicious &quot;-&quot; from \
the<br> version and added a normal hyphen, and built a new opengrok.jar. And ran<br>
index again after removing all the data,log,etc folders just to be<br>
sure.That seemed to work,atleast there are lotsof lshistory being executed<br>
in the log files, and i can see the historycache now :) :)<br>
</blockquote>
<br></div>
Cool.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> But  the history links are still not working. I went and \
checked and saw<br> that there is a gz file for that file in the historycache \
section, but the<br> history link is still deactivated. I cannot see the history link \
for any<br> file for that matter. Any clues?<br>
</blockquote>
<br></div>
The hasHistory() function in \
src/org/opensolaris/opengrok/<u></u>history/HistoryGuru.java determines whether the \
&#39;History&#39; link will be shown (or just a text).<br> <br>
It does this:<br>
<br>
245    public boolean hasHistory(File file) {<br>
246        Repository repos = getRepository(file);<br>
247<br>
248        return repos == null<br>
249            ? false<br>
250            : repos.isWorking() &amp;&amp; repos.fileHasHistory(file)<br>
251                &amp;&amp; \
(RuntimeEnvironment.<u></u>getInstance().<u></u>isRemoteScmSupported()<br> 252        \
|| !repos.isRemote());<br> 253    }<br>
<br>
The repos.isWorking() should be satisfied by the &#39;-version&#39; check. The \
repos.fileHasHistory(file) should be true since there are gzip&#39;ed files in the \
history directory.<br> <br>
Not sure if Clearcase needs to query remote server to get the history but OpenGrok \
script enables it by default so it should work too.<br> <br>
One thing to check - the source.war Java archive also contains opengrok.jar, so you \
might need to rebuild the archive too with the fixed version and deploy it.<div \
class="im"><br> <br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> I have not worked on java before much.Till yesterday, i did \
not know how to<br> build the jar file from the source. I have figured that out now. \
So if u<br> need any info, i can add logs and check the execution flow.<br>
</blockquote>
<br></div>
You might want to add some debugging prints to the above function (or to mast.jsp \
where it calls &#39;cfg.hasHistory()&#39;) to see what parts of the predicate are \
actually true.<span class="HOEnZb"><font color="#888888"><br>


<br>
<br>
v.<br>
</font></span></blockquote></div><br>



_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic