On 3/13/07, Lieven Govaerts <firstname.lastname@example.org> wrote:
> Hm, are you talking about paths relative to the repository root? Or actual urls?
Absolute url's (I guess they are called paths as well) within the
repository. During a 'svnadmin verify', for example, in
libsvn_fs_fs\tree.c the open_path function calls svn_path_join on line
path_so_far = svn_path_join(path_so_far, entry, pool);
and appears to be expecting an absolute url to be returned. In the
case of the sample repo, the return value is 'c:hi' rather than
'/c:hi' as it expects -- this later causes the assert on line 148 of
make_txn_root to fail and kills the process.
> > 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.
Right -- this sort of thing has happened a few times in the past, I
believe. Since urls and paths are very similar on unixy OS', it's
easy to miss the distinction.
Do we need a svn_path_local_join (or something) and then fix callers
that use svn_path_join incorrectly? That can be hard to determine
sometimes, if I remember correctly.
> 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.
Thanks for looking at it!
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Tue Mar 13 18:08:46 2007