[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-dev] History as revision graph

From: Alberto Gimeno <gimenete_at_gmail.com>
Date: Thu, 3 Jul 2008 16:17:03 +0200

I could get the latest revision number from the last entry of the
array, yes, that's what I thought. However I thought that fetching
lots of log messages in an array could not be fine (suppose 300.000
log messages in an array). And also getting the log messages in parts
I could process them in a separate thread. One thread calls the
repository for the next 100 log messages and other thread processes
the previous 100 log messages fetched.

I also would be good to have method like this:

public void getLogMessage(repository, from, to, GetLogMessageListener listener);

public interface GetLogMessageListener {
public void read(LogMessage[] messages);
}

GetLogMessageListener is a callback interface that calls the read()
message when X log messages are read. This is like the SAX API for
reading XML files and its characters() method.

> need an idea of what HEAD is before you run, you could call the info
> API and pass it HEAD and then see what the revision is that you get
> back.

Could you tell me which methods and classes should I use?

On Thu, Jul 3, 2008 at 4:04 PM, Mark Phippard <markphip_at_gmail.com> wrote:
> On Thu, Jul 3, 2008 at 9:57 AM, Alberto Gimeno <gimenete_at_gmail.com> wrote:
>
>> The cache is calculated just once. But that first time it has to do
>> several calculations. For example when I get this log messege:
>>
>> D /foo/bar
>>
>> In my implementation I have to update all the subfiles and subfolders
>> of /foo/bar to mark them as deleted in that revision. However the
>> second time, the cache just needs to query for updates. For example in
>> a repository with 4000 revisions the first time it needs to cache
>> those 4000 revisions. But the next time the cache just will need to
>> cache 10, 20, 30 revisions. However, yes, for the first time it takes
>> too much time.
>>
>> Now I'm using PreparedStatements and I reuse them. Maybe I could use
>> batch operations. But I'm not sure.
>>
>> I want to take some metrics on different repositories. But I haven't
>> had time these days.
>>
>> Also I would like to update the cache in chunks. For example from 100
>> to 100 revisions. By doing this I could update the monitor progress
>> bar between those chunks. Now I'm getting all the log messeges inside
>> one array by using
>>
>> client.getLogMessages(info.getRepository(), latest, SVNRevision.HEAD);
>>
>> Where "latest" is the latest revision number I have in the cache. Is
>> there any way to know which revision number has the HEAD revision?
>
> Accurate and detailed progress information certainly makes any
> operation feel faster. Do you need to know HEAD before you call the
> API? I'd think you could just look at the array you get back and see
> how many entries it contains or even peek at the last entry. If you

>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subclipse.tigris.org
> For additional commands, e-mail: dev-help_at_subclipse.tigris.org
>
>

-- 
Alberto Gimeno Brieba
Presidente y fundador de
Ribe Software S.L.
http://www.ribesoftware.com
ribe_at_ribesoftware.com
Contacto personal
eMail: gimenete_at_gmail.com
GTalk: gimenete_at_gmail.com
msn: gimenete_at_hotmail.com
página web: http://gimenete.net
teléfono móvil: +34 625 24 64 81
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subclipse.tigris.org
For additional commands, e-mail: dev-help_at_subclipse.tigris.org
Received on 2008-07-03 16:17:16 CEST

This is an archived mail posted to the Subclipse Dev mailing list.