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

Re: svnadmin dump/verify/load uses svn_path_join

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: 2007-03-13 14:31:08 CET

Quoting "D.J. Heap" <djheap@gmail.com>:

> I've run into a rather nasty issue with a repository using trunk code.
> I've attached a test repository that works fine in 1.4.x or earlier
> but croaks when loading with trunk code built on Windows.
> The core issue seems to be that the dump/verify/load code uses
> svn_path_join on url's and svn_path_join now seems to be assuming that
> it is working with filesystem paths, not urls.

That's a result of the windows path changes I made last year. I based
myself on the available unit tests at that time, and there were none for url's.

> This means that in Win32 builds, 'svnadmin dump/load/verify' asserts
> and aborts for repositories that have urls such as '/c:hi' (it can't
> be checked out on Windows, of course, but that is a client/filesystem
> issue). It is probably not as much of an issue on Unix-type OS'
> because their filesystem paths look a lot like urls.

Hm, are you talking about paths relative to the repository root? Or actual urls?

> Should 'svnadmin dump/verify/load' not be using svn_path_join or
> should svn_path_join work with urls?

I checked out the comments of svn_path_join, and they say:

 * Note that the contents of @a base are not examined, so it is possible to
 * use this function for constructing URLs, or for relative URLs or
 * repository paths.
 * This function is NOT appropriate for native (local) file
 * paths. Only for "internal" canonicalized paths, since it uses '/'
 * for the separator. Further, an absolute path (for @a component) is
 * based on a leading '/' character. Thus, an "absolute URI" for the
 * @a component won't be detected.

The problem is that svn_path_join *is* used for local paths despite the warning
in the comments, so that's why it has to work with Windows paths too. We miss a
clear separation between functions for internal paths and functions for native
paths at the moment.

Based on your report I'm worried a bit that there are more situations like this,
 were path functions for internal paths were modified to work for Windows paths.
I'll see what I can find, tonight.


This message was sent using IMP, the Internet Messaging Program.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 13 14:31:33 2007

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