You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2009/03/05 13:26:18 UTC

Re: svn commit: r36325 - trunk/subversion/libsvn_repos

On Wed, Mar 4, 2009 at 21:22, Bert Huijben <rh...@sharpsvn.net> wrote:
> Author: rhuijben
> Date: Wed Mar  4 12:22:11 2009
> New Revision: 36325
>
> Log:
> * subversion/libsvn_repos/repos.c
>  (svn_repos_find_root_path): Resolve endless loop on not absolute path.
>    Reproducable on windows with svn log file:///nonexistant. (basic_tests 20)

Why did the previous algorithm fail? Shouldn't "test for is_root"
work? I'm worried that this change is simply working around a bug, and
solving a symptom.

>...
> +++ trunk/subversion/libsvn_repos/repos.c       Wed Mar  4 12:22:11 2009        (r36325)
> @@ -1359,6 +1359,7 @@ svn_repos_find_root_path(const char *pat
>
>   while (1)
>     {
> +      char *parent;
>       /* Try to decode the path, so we don't fail if it contains characters

const on that, so that it doesn't seem like you're going to try and
modify it. And a blank line is always nice :-)

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1272143


RE: svn commit: r36325 - trunk/subversion/libsvn_repos

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Greg Stein [mailto:gstein@gmail.com]
> Sent: donderdag 5 maart 2009 14:26
> To: dev@subversion.tigris.org
> Subject: Re: svn commit: r36325 - trunk/subversion/libsvn_repos
> 
> On Wed, Mar 4, 2009 at 21:22, Bert Huijben <rh...@sharpsvn.net> wrote:
> > Author: rhuijben
> > Date: Wed Mar  4 12:22:11 2009
> > New Revision: 36325
> >
> > Log:
> > * subversion/libsvn_repos/repos.c
> >  (svn_repos_find_root_path): Resolve endless loop on not absolute path.
> >    Reproducable on windows with svn log file:///nonexistant. (basic_tests
> 20)
> 
> Why did the previous algorithm fail? Shouldn't "test for is_root"
> work? I'm worried that this change is simply working around a bug, and
> solving a symptom.

This algorithm fails on non absolute paths like
"a/b/c"
-> "a/b"
-> "a"
-> ""
-> ""
(no end)

Between r36310 and r36327, svn_dirent_is_root() gave false for "/" on Windows

"/b/c"
-> "/b"
-> "/"
-> "/"
(no end)

In r36327, was reverted to the old behavior of returning true on "/", so r36325 can be reverted.

	Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1272165