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 2012/03/02 06:47:40 UTC

Re: svn commit: r1296056 - /subversion/trunk/subversion/libsvn_client/util.c

On Mar 2, 2012 12:33 AM, <hw...@apache.org> wrote:
>
> Author: hwright
> Date: Fri Mar  2 05:33:22 2012
> New Revision: 1296056
>
> URL: http://svn.apache.org/viewvc?rev=1296056&view=rev
> Log:
> In the client-side ra Ev2 shim callbacks, make sure we handle copyfrom
paths
> correctly.
>
> Current number of test failures over ra_svn: 357
>
> * subversion/libsvn_client/util.c
>  (fetch_props_func, fetch_kind_func, fetch_base_func): Detect and
appropriately
>    munge copyfrom urls as paths.

Woah... wait a second. How did a URL get into the callback? I really think
these callbacks should have a single semantic: relpath. But why should we
continue the client monstrosity of "maybe path; maybe URL".

???

This change seems to paper over a URL leaking into the callbacks. That
doesn't seem right.

Cheers,
-g

Re: svn commit: r1296056 - /subversion/trunk/subversion/libsvn_client/util.c

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Mar 2, 2012 at 6:20 AM, C. Michael Pilato <cm...@collab.net> wrote:
> On 03/02/2012 01:03 AM, Greg Stein wrote:
>> On Fri, Mar 2, 2012 at 01:01, Greg Stein <gs...@gmail.com> wrote:
>>> On Fri, Mar 2, 2012 at 00:47, Greg Stein <gs...@gmail.com> wrote:
>>> Looking more into this, the shims should accept an "anchor_url" and if
>>> they receive a URL in the copyfrom_path, then it should turn that URL
>>> into a relpath from that anchor. And *then* invoke the callback.
>>>
>>> IOW, I think the original bug is that a URL is passed into
>>> ev1->add_file(copyfrom_path). The shim should strip that down to a
>>> relpath before invoking the callback.
>>
>> And replying to myself one more time... :-)
>>
>> Yes, I know that the delta editor spec allows a URL to be passed as
>> that parameter. But I don't think we should propagate it into the
>> callbacks. Messy.

I would welcome a cleaner handling of this, but as structured we just
don't have enough information to generate a proper relpath from the
URL that Ev1 senders give us.

> Just to add, you know, a second voice to this already lengthy conversation
> :-):  that Ev1 add_file/dir allows URLs is definitely confusing at times.
> The need for it is fairly obvious, though:  sometimes you have to copy from
> a location that's outside the edit tree, requiring either an absolute path
> reference (such as a URL) or a relative path with '..' components.  URLs
> were the obvious first choice.
>
> If Ev2 can handle such cases without using URLs, +1 to barring their
> introduction into the supported parameter set.

Agreed, though I think the changes required to support such a paradigm
will be much more intrusive than it may appear at first blush (and
somewhat beyond the scope of what I'm trying to do *right now*).  If
somebody wants to jump in and tackle them, I'd be much obliged.

-Hyrum



-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: svn commit: r1296056 - /subversion/trunk/subversion/libsvn_client/util.c

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 03/02/2012 01:03 AM, Greg Stein wrote:
> On Fri, Mar 2, 2012 at 01:01, Greg Stein <gs...@gmail.com> wrote:
>> On Fri, Mar 2, 2012 at 00:47, Greg Stein <gs...@gmail.com> wrote:
>> Looking more into this, the shims should accept an "anchor_url" and if
>> they receive a URL in the copyfrom_path, then it should turn that URL
>> into a relpath from that anchor. And *then* invoke the callback.
>>
>> IOW, I think the original bug is that a URL is passed into
>> ev1->add_file(copyfrom_path). The shim should strip that down to a
>> relpath before invoking the callback.
> 
> And replying to myself one more time... :-)
> 
> Yes, I know that the delta editor spec allows a URL to be passed as
> that parameter. But I don't think we should propagate it into the
> callbacks. Messy.

Just to add, you know, a second voice to this already lengthy conversation
:-):  that Ev1 add_file/dir allows URLs is definitely confusing at times.
The need for it is fairly obvious, though:  sometimes you have to copy from
a location that's outside the edit tree, requiring either an absolute path
reference (such as a URL) or a relative path with '..' components.  URLs
were the obvious first choice.

If Ev2 can handle such cases without using URLs, +1 to barring their
introduction into the supported parameter set.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: svn commit: r1296056 - /subversion/trunk/subversion/libsvn_client/util.c

Posted by Greg Stein <gs...@gmail.com>.
On Fri, Mar 2, 2012 at 01:01, Greg Stein <gs...@gmail.com> wrote:
> On Fri, Mar 2, 2012 at 00:47, Greg Stein <gs...@gmail.com> wrote:
>>
>> On Mar 2, 2012 12:33 AM, <hw...@apache.org> wrote:
>>>
>>> Author: hwright
>>> Date: Fri Mar  2 05:33:22 2012
>>> New Revision: 1296056
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1296056&view=rev
>>> Log:
>>> In the client-side ra Ev2 shim callbacks, make sure we handle copyfrom
>>> paths
>>> correctly.
>>>
>>> Current number of test failures over ra_svn: 357
>>>
>>> * subversion/libsvn_client/util.c
>>>  (fetch_props_func, fetch_kind_func, fetch_base_func): Detect and
>>> appropriately
>>>    munge copyfrom urls as paths.
>>
>> Woah... wait a second. How did a URL get into the callback? I really think
>> these callbacks should have a single semantic: relpath. But why should we
>> continue the client monstrosity of "maybe path; maybe URL".
>>
>> ???
>>
>> This change seems to paper over a URL leaking into the callbacks. That
>> doesn't seem right.
>
> Looking more into this, the shims should accept an "anchor_url" and if
> they receive a URL in the copyfrom_path, then it should turn that URL
> into a relpath from that anchor. And *then* invoke the callback.
>
> IOW, I think the original bug is that a URL is passed into
> ev1->add_file(copyfrom_path). The shim should strip that down to a
> relpath before invoking the callback.

And replying to myself one more time... :-)

Yes, I know that the delta editor spec allows a URL to be passed as
that parameter. But I don't think we should propagate it into the
callbacks. Messy.

Cheers,
-g

Re: svn commit: r1296056 - /subversion/trunk/subversion/libsvn_client/util.c

Posted by Greg Stein <gs...@gmail.com>.
On Fri, Mar 2, 2012 at 00:47, Greg Stein <gs...@gmail.com> wrote:
>
> On Mar 2, 2012 12:33 AM, <hw...@apache.org> wrote:
>>
>> Author: hwright
>> Date: Fri Mar  2 05:33:22 2012
>> New Revision: 1296056
>>
>> URL: http://svn.apache.org/viewvc?rev=1296056&view=rev
>> Log:
>> In the client-side ra Ev2 shim callbacks, make sure we handle copyfrom
>> paths
>> correctly.
>>
>> Current number of test failures over ra_svn: 357
>>
>> * subversion/libsvn_client/util.c
>>  (fetch_props_func, fetch_kind_func, fetch_base_func): Detect and
>> appropriately
>>    munge copyfrom urls as paths.
>
> Woah... wait a second. How did a URL get into the callback? I really think
> these callbacks should have a single semantic: relpath. But why should we
> continue the client monstrosity of "maybe path; maybe URL".
>
> ???
>
> This change seems to paper over a URL leaking into the callbacks. That
> doesn't seem right.

Looking more into this, the shims should accept an "anchor_url" and if
they receive a URL in the copyfrom_path, then it should turn that URL
into a relpath from that anchor. And *then* invoke the callback.

IOW, I think the original bug is that a URL is passed into
ev1->add_file(copyfrom_path). The shim should strip that down to a
relpath before invoking the callback.

Cheers,
-g