[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: Mark Phippard <markphip_at_gmail.com>
Date: Thu, 3 Jul 2008 10:27:48 -0400

On Thu, Jul 3, 2008 at 10:17 AM, Alberto Gimeno <gimenete_at_gmail.com> wrote:
> 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.

At the JavaHL level the API already works this way. We just do not
expose it to you in SVNClientAdapter.

In AbstractJhlClientAdapter see this method:

        private ISVNLogMessage[] getLogMessages(String target, SVNRevision
pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd,
boolean stopOnCopy, boolean fetchChangePath, long limit, boolean
includeMergedRevisions) throws SVNClientException {

and the JhlLogMessageCallback class which is the listener we use to
make the array.

We could expose an SVNClientAdapter version of this API so that you
could provide your own callback. I am not sure how well JavaHL would
"like" calling a callback that spent a fair amount of time doing work.
 It might expect the callbacks to be processed fast. This can become
an issue with how it manages it network connection with the server.

>> 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?

One of these:

        /**
         * Get information about an URL.
         * Uses info2() call which contacts the repository
         * @param url
         * @return information about an URL.
         * @throws SVNClientException
         */
        public ISVNInfo getInfo(SVNUrl url) throws SVNClientException;

        /**
         * Get information about an URL.
         * Uses info2() call which contacts the repository
         * @param url
         * @param revision
         * @param peg
         * @return information about an URL.
         * @throws SVNClientException
         */
        public ISVNInfo getInfo(SVNUrl url, SVNRevision revision, SVNRevision
peg) throws SVNClientException;

Then call ISVNInfo.getRevision()

-- 
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
Received on 2008-07-03 16:29:34 CEST

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