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

Re: CVS update: subversion/subversion/libsvn_ra_local Makefile.am ra_local.h ra_plugin.c split_url.c

From: Ben Collins-Sussman <sussman_at_newton.ch.collab.net>
Date: 2001-02-10 03:06:42 CET

Greg Stein <gstein@lyra.org> writes:

> Overkill. Use:
>
> *plugin = &ra_local_plugin;
>

Heh, sure. :)
>
> >... [ split_url ]
>
> This function would be a *lot* simpler, if you:
>
> 1) make a dup of the URL
> 2) strip the leading file:// portion (leaving "/abs/path/foo/bar")
> 3) loop:
> a) try to open FS with the path. succeed: break
> b) chop the last component off
> 4) fs_path is what remains, repos_path is &URL[strlen(fs_path) + 7]
> (the +7 is to account for "file://" at the start of the URL)

Oh, this is the *easy* way, which I purposely avoided.

I wanted to be "correct" by searching from the other direction,
thereby always finding the repository with the shortest path, not the
longest.

Yes, I know, we agreed that we will never allow nested repositories.
I guess I was being paranoid and trying to emulate Apache's search
methods. :)

Do you think it's worth re-writing?
Received on Sat Oct 21 14:36:21 2006

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.