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

Re: [Subclipse-dev] GSoC and Issue 721: Show file history as revision graph

From: Alberto Gimeno <gimenete_at_gmail.com>
Date: Fri, 21 Mar 2008 15:32:55 +0100

On Thu, Mar 20, 2008 at 9:47 PM, Mark Phippard <markphip_at_gmail.com> wrote:
> On Thu, Mar 20, 2008 at 10:11 AM, Alberto Gimeno <gimenete_at_gmail.com> wrote:
> >
> > When I need to store a tree structure in a database I use this
> > approach: http://www.sitepoint.com/article/hierarchical-data-database/2
> > The problem is that the table has to be rebuild when new nodes are
> > inserted. Because the two columns that store the information used to
> > place the nodes need to be recalculated.
> >
> > I'm trying to know which approach they use in TortoiseSVN.
> > Here (http://tortoisesvn.tigris.org/tsvn_1.5_releasenotes.html) they
> > only talk about "TortoiseSVN 1.5 can cache the log entries on the
> > local drive".
> > And here (http://issues.tortoisesvn.net/?do=details&task_id=45) they
> > just talk about "log cache data structures" but they don't explain
> > wich kind of data structures they use and how they save them in the
> > local machine.
> >
> > I'm going to continue investigating.
>
> Something to keep in mind is that for it to work properly, you might
> need to recreate the DAG qualities of the SVN repository. For
> example, a file you are looking at for history may have been moved at
> some point in its history and so it is not as simple as querying based
> on path. As a simple example, the project folder in the repository
> for our core plugin used to be called "core" and now it is
> "org.tigris.subversion.subclipse.core".
>
> We ran into this as a problem in Subversion itself and the usage of
> SQLite to store merge tracking information. There were some real
> problems that were going to exist if we did not figure out a way to
> recreate the DAG features in SQLite. As it turned out we were lucky
> and after some careful analysis realized we did not need SQLite at all
> and could just answer the queries directly from the repository.
>
> --
>
>
> 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
>
>

I've been taking a look at the source code of TortoiseSVN
(http://tortoisesvn.tigris.org/svn/tortoisesvn/branches/RefactorRevGraph/src/LogCache/
use 'guest' as user name and no password). The source code has no
comments but as far as I've understood they use a custom binary data
format that stores the information in a hierachical structure.

Maybe java serialization should be used instead of an embedded
database. The major disadvantage of java serialization is that
changing classes means the old cache is no longer useful. Other
solution is to create a custom binary data format using
DataInput/OutputStreams. This requires a bigger effort but solves the
problem of java serialization.

Other solution could be XML because is a format for storing
hierachical information. But of course is slower to parse than any
binary format. And having a lot of information will generate very big
XML files. It could be a problem. Nevertheless TortoiseSVN appears to
have also XML support
(http://tortoisesvn.tigris.org/svn/tortoisesvn/branches/RefactorRevGraph/src/LogCache/XMLLogWriter.cpp)

-- 
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-03-21 15:33:35 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.