You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2008/04/10 09:11:44 UTC
Re: svn commit: r30482 - trunk/subversion/svnsync
On Thu, Apr 10, 2008 at 1:22 AM, <lg...@tigris.org> wrote:
> Author: lgo
> Date: Thu Apr 10 01:22:45 2008
> New Revision: 30482
>
> Log:
> Fix issue in svnsync where a repository 'file:///repository' was incorrectly
> recognized as child of 'file:///repo', requiring partial replay capability.
>
> Found by: glasser
>
> * subversion/svnsync/main.c
> (do_initialize): Use correct url comparison function.
>
> Modified:
> trunk/subversion/svnsync/main.c
>
> Modified: trunk/subversion/svnsync/main.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/svnsync/main.c?pathrev=30482&r1=30481&r2=30482
> ==============================================================================
> --- trunk/subversion/svnsync/main.c Thu Apr 10 01:03:48 2008 (r30481)
> +++ trunk/subversion/svnsync/main.c Thu Apr 10 01:22:45 2008 (r30482)
> @@ -626,7 +626,7 @@ do_initialize(svn_ra_session_t *to_sessi
>
> /* If we're doing a partial replay, we have to check first if the server
> supports this. */
> - if (strcmp(root_url, baton->from_url) < 0)
> + if (svn_path_is_ancestor(root_url, baton->from_url))
But won't that return true if the paths are equal?
The case I was concerned about wasn't /repo vs /repository (since I
don't think opening /repository will give you something with a repo
root of /repo); it was "spurious extra slashes".
--dave
> {
> svn_boolean_t server_supports_partial_replay;
> svn_error_t *err = svn_ra_has_capability(from_session,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r30482 - trunk/subversion/svnsync
Posted by David Glasser <gl...@davidglasser.net>.
On Thu, Apr 10, 2008 at 2:17 AM, Lieven Govaerts <sv...@mobsol.be> wrote:
> David Glasser wrote:
>
> > On Thu, Apr 10, 2008 at 1:22 AM, <lg...@tigris.org> wrote:
> >
> > > Author: lgo
> > > Date: Thu Apr 10 01:22:45 2008
> > > New Revision: 30482
> > >
> > > Log:
> > > Fix issue in svnsync where a repository 'file:///repository' was
> incorrectly
> > > recognized as child of 'file:///repo', requiring partial replay
> capability.
> > >
> > > Found by: glasser
> > >
> > > * subversion/svnsync/main.c
> > > (do_initialize): Use correct url comparison function.
> > >
> > > Modified:
> > > trunk/subversion/svnsync/main.c
> > >
> > > Modified: trunk/subversion/svnsync/main.c
> > > URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/svnsync/main.c?pathrev=30482&r1=30481&r2=30482
> > >
> ==============================================================================
> > > --- trunk/subversion/svnsync/main.c Thu Apr 10 01:03:48 2008
> (r30481)
> > > +++ trunk/subversion/svnsync/main.c Thu Apr 10 01:22:45 2008
> (r30482)
> > > @@ -626,7 +626,7 @@ do_initialize(svn_ra_session_t *to_sessi
> > >
> > > /* If we're doing a partial replay, we have to check first if the
> server
> > > supports this. */
> > > - if (strcmp(root_url, baton->from_url) < 0)
> > > + if (svn_path_is_ancestor(root_url, baton->from_url))
> > >
> >
> > But won't that return true if the paths are equal?
> >
> yes.
>
>
>
> >
> > The case I was concerned about wasn't /repo vs /repository (since I
> > don't think opening /repository will give you something with a repo
> > root of /repo); it was "spurious extra slashes".
> >
> >
> Ok, different case. I didn't test, but I assume urrent behavior now
> probably breaks on 1.4 servers again? We'll probably need svn_path_is_child
> instead of .._ancestor here.
>
> I don't have time right now, but can look at it tonight.
Looks like cmpilato took care of this in r30489.
And my extra-slash concern is unfounded because svnsync uses an API
which canonicalizes its URL inputs.
--dave
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r30482 - trunk/subversion/svnsync
Posted by Lieven Govaerts <sv...@mobsol.be>.
David Glasser wrote:
> On Thu, Apr 10, 2008 at 1:22 AM, <lg...@tigris.org> wrote:
>> Author: lgo
>> Date: Thu Apr 10 01:22:45 2008
>> New Revision: 30482
>>
>> Log:
>> Fix issue in svnsync where a repository 'file:///repository' was incorrectly
>> recognized as child of 'file:///repo', requiring partial replay capability.
>>
>> Found by: glasser
>>
>> * subversion/svnsync/main.c
>> (do_initialize): Use correct url comparison function.
>>
>> Modified:
>> trunk/subversion/svnsync/main.c
>>
>> Modified: trunk/subversion/svnsync/main.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/svnsync/main.c?pathrev=30482&r1=30481&r2=30482
>> ==============================================================================
>> --- trunk/subversion/svnsync/main.c Thu Apr 10 01:03:48 2008 (r30481)
>> +++ trunk/subversion/svnsync/main.c Thu Apr 10 01:22:45 2008 (r30482)
>> @@ -626,7 +626,7 @@ do_initialize(svn_ra_session_t *to_sessi
>>
>> /* If we're doing a partial replay, we have to check first if the server
>> supports this. */
>> - if (strcmp(root_url, baton->from_url) < 0)
>> + if (svn_path_is_ancestor(root_url, baton->from_url))
>
> But won't that return true if the paths are equal?
yes.
>
> The case I was concerned about wasn't /repo vs /repository (since I
> don't think opening /repository will give you something with a repo
> root of /repo); it was "spurious extra slashes".
>
Ok, different case. I didn't test, but I assume urrent behavior now
probably breaks on 1.4 servers again? We'll probably need
svn_path_is_child instead of .._ancestor here.
I don't have time right now, but can look at it tonight.
Lieven
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org