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

Re: Crash in TSVN during Show Log

From: <Stefan.Fuhrmann_at_etas.com>
Date: Thu, 20 Mar 2008 01:48:31 +0100

"Robert Dailey" <rcdailey_at_gmail.com> wrote on 19.03.2008 23:35:46:

> On Wed, Mar 19, 2008 at 5:03 PM, Oren Eini (Murphy & Associates)
<v-orene_at_microsoft.com> wrote:
> I think that it should also take into account the repository UUID.
> I'll ensure that per server it is different.

That would help a lot to implement a simple fix.
TSVN requires some means to identify the repository
*somehow*. UUIDs are, per definition, unambiguous.

This is how the TSVN log cache works.

(1) If the path refers to a WC, ask SVN for the URL.

(2) Find an entry in the cached repository list
    that matches the beginning of the URL.
    (e.g. http://localhost/svn/)

(3a) Hit: Get the UUID cached for this repository.
(3b) Miss: Ask SVN for RepoURL and UUID. Cache it.

(4) Open / create the cache file named by the UUID.
    URL minus RepoURL is the cache-/repository-
    relative path that the log will be created for.

(5) Depending on time-out, ask either SVN or the
    cache for the HEAD revision (required when
    calling log for a WC).

(6) Crawl the cache and fill gaps by asking SVN for
    log data as needed. *Don't* ask SVN if the cache
    says "I got all data for those revisions"!

So, the current implementation makes a number of
assumptions that must not be violated:

(1) No two repositories have been accessible through
    the same URL. In particular, not sequentially.
    The same repository may be used through multiple
    URLs, though.

    Also, TSVN will use the SVN API to determine
    the repository URL. For instance, if

    http://localhost/svn/project1/ and
    http://localhost/svn/project2/

    are different repositories, they must not return
    http://localhost/svn/ as repository root.

(2) UUIDs must not be reused / recycled for different
    repositories.

(3) A repository has only one root. This makes paths
    within the repository (relative to the root) unique.
    For instance, if

    http://localhost/svn/project1/ and
    http://localhost/svn/project2/

    use the same repository UUID, they must not return
    either http://localhost/svn/ or http://localhost/
    as repository root.

(4) A repository has only one revision history.
    This is similar to (3) but requires that the change-
    lists (SVN log -v output) for the same revision is
    for all paths either empty or identical.

(5) The history is immutable. A dump | filter | load
    cycle requires the user to delete the cache.

I think (2), (3) and (4) are required by the SVN design
anyway. TSVN may try to identify instances of (5) and
many cases of (1) .. (4) by throwing more checks on it.

For (1) a simple work-around can be added to TSVN.
I will add a simple switch that forces TSVN to bypass
the local cache for the RepoURL, UUID look-up.

If everything goes well, this will be in the nightlies
Friday morning.

-- Stefan^2.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: dev-help_at_tortoisesvn.tigris.org
Received on 2008-03-20 01:48:48 CET

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

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