One thought: maybe it is proper/appropriate to simply state that the
relpath values *must* be repos_relpath values. IOW, that Ev2 drives
are always in reference to a given repository; thus, all relpaths must
be relative to that repos root.
Our APIs historically have attempted to avoid reference to repos_root
because I wanted resources to be standalone, rather than related to
some other entity. Over time, that position was unquestionably wrong,
and we've been moving away from it. Knowing "repos_root_url" is
important, and helps in any number of ways.
We're still isolated to a single repository (ie. repos_relpath implies
no-foreign-merge), but I think we have headspace to fix that. For
example, an Ev2 drive can easily negotiate the semantics of relpaths
such as "1/foo/path" and "2/bar/path".
Back to the original point: editor drives are *always* talking about
versioned resources (?? call out wrongness), so maybe we can just
state that an Ev2 drive is *always* talking about repos_relpath
values. If one side is a working copy, then fine: just map those nodes
against their repository node paths. Each item within an Ev2 drive
concerns a versioned node; thus, we can always provide a
repos_relpath.
Whaddyathink?
Cheers,
-g
On Sat, Apr 7, 2012 at 20:35, Greg Stein <gstein_at_gmail.com> wrote:
> Hyrum,
>
> This is a start to fix the URL issue. I'm away for a while, so feel
> free to patch up the two map_to_* functions with the right magic.
>
> There is a separate issue about the editor roots, in order to properly
> support copy sources (also see r1310929). We probably need to adjust
> the root that we're using for the Ev2 drive.
>
> Cheers,
> -g
>
> On Sat, Apr 7, 2012 at 20:13, <gstein_at_apache.org> wrote:
>> Author: gstein
>> Date: Sun Apr 8 00:13:26 2012
>> New Revision: 1310925
>>
>> URL: http://svn.apache.org/viewvc?rev=1310925&view=rev
>> Log:
>> Ev2 shims:
>>
>> First pass at the work necessary to deal with copyfrom_path values
>> that can be URLs. When we call svn_editor_copy(), we can only pass
>> relpath values.
>>
>> This commit will map all incoming paths in the delta editor callbacks
>> into relpath values.
>>
>> Note: strictly speaking, the copy source may not be within a working
>> copy, so it generally means an editor drive should be based on
>> repos_root so that all sources can be referenced. Thus, we map the
>> copyfrom paths a little bit different.
>> (future commit to update svn_editor.h docco with this point)
>>
>> Note: I'm not entirely sure that normal paths in an Ev1 drive are ever
>> URLs. This mapping may only apply to copyfrom sources.
>>
>> * subversion/libsvn_delta/compat.c:
>> (map_to_relpath, map_to_repos_relpath): new helpers to deal with
>> potential URLs, and turn them into relpaths.
>> (ev2_delete_entry): map the incoming PATH to a relpath
>> (ev2_add_directory): map the incoming PATH and COPYFROM_PATH to
>> relpaths. introduce a pseudo-scratch_pool and use it. reorder
>> copyfrom handling to make CHANGE be the definitive values.
>> (ev2_open_directory): map the incoming PATH to a relpath. introduce
>> a pseudo-scratch_pool and use it.
>> (ev2_absent_directory): map the incoming PATH to a relpath
>> (ev2_add_file): map the incoming PATH and COPYFROM_PATH to relpaths.
>> introduce a pseudo-scratch_pool and use it. reorder copyfrom
>> handling to make CHANGE be the definitive values.
>> (ev2_open_file): map the incoming PATH to a relpath. introduce a
>> pseudo-scratch_pool and use it.
>> (ev2_absent_file): map the incoming PATH to a relpath
>>
>> Modified:
>> subversion/trunk/subversion/libsvn_delta/compat.c
...
Received on 2012-04-08 11:35:55 CEST