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

New Spec for the Get-locations Operation

From: Shlomi Fish <shlomif_at_iglu.org.il>
Date: 2004-04-28 17:51:15 CEST

Hi all!

It turned out that the existing design, within my patch, of the get-locations
vtable callback and the associated protocols is a inconsistent with the
conventions of the rest of the RA layer. So here is a new specification of
them, that are more consistent. This is a summary of the conclusions reached
during the discussions of sussman, ghudson and I. (and possibly other people).

The new spec of the callback is the following:

  svn_error_t *(*get_locations) (void *session_baton,
                                 apr_hash_t **locations,
                                 const char *path,
                                 svn_revnum_t peg_revision,
                                 apr_array_header_t *location_revisions,
                                 apr_pool_t *pool);

The types are the same as before, but their semantics are different. "path"
is a relative path to the URL that the RA session has opened. peg_revision
is the peg revision where (path,peg) are known to exist in the repository.
location_revisions is an array of svn_revnum_t's with the past or future
revisions of the locations that need to be traced. This time, "locations"
map these revisions to the _absolute_ paths of the node in the repository
at these revisions. (*Not to the URLs!*).

Now to the protocols. Judging by the previous conventions of these protocols,
then these protocols map nicely with this API. I.e: the relative source path
is
sent on the wire, and what is received are the absolute paths from the
repository (again - not the URLs) for both ra_svn and ra_dav.

Some of the wrapping XML tags for the WebDAV/DeltaV transport would have to
change, a typical session would like like this:

Query:
------

<S:get-locations xmlns:S="$SVN_NS" xmlns:D="DAV:">
<S:path>$path</S:path>
<S:peg-revision>$peg_revision</S:peg-revision>
<S:location-revision>$revs[0]</S:location-revision>
<S:location-revision>$revs[1]</S:location-revision>
</S:get-locations>

Response:
---------

<S:get-locations-report xmlns:S="$SVN_NS" xmlns:D="DAV:">
    <S:location>
        <S:location-revision>$revs[0]</S:location-revision>
        <S:path>$ret_abs_path[0]</S:path>
    </S:location>
    <S:location>
        <S:location-revision>$revs[1]</S:location-revision>
        <S:path>$ret_abs_path[1]</S:path>
    </S:location>
</S:get-locations-report>

The ra_svn/svnserve protocol remains the same, just the contents of the
strings is different.

Comments are welcome, so please hurry before I actually start working on
incorporating these changes.

Regards,

    Shlomi Fish

-- 
---------------------------------------------------------------------
Shlomi Fish      shlomif@iglu.org.il
Homepage:        http://shlomif.il.eu.org/
Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 28 17:46:50 2004

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

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