[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH][merge-tracking] svn repos to repos copy fails with vague error over ra_svn

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-11-30 12:53:42 CET

>> * subversion/svnserve/serve.c
>> (get_merge_info):
>> The incoming 'paths' tuple is an array of 'svn_ra_svn_item_t' and each
>> item should be of kind 'SVN_RA_SVN_STRING'.
>> The result is again a list of (path mergeinfo) tuple.
>>
> ...
>
>> Index: subversion/svnserve/serve.c
>> ===================================================================
>> --- subversion/svnserve/serve.c (revision 22389)
>> +++ subversion/svnserve/serve.c (working copy)
>> @@ -1354,8 +1354,15 @@
>> SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)b", &paths, &rev,
>> &include_parents));
>> for (i = 0; i < paths->nelts; i++)
>> - APR_ARRAY_IDX(paths, i, const char *) =
>> - svn_path_canonicalize(APR_ARRAY_IDX(paths, i, const char *), pool);
>> + {
>> + svn_ra_svn_item_t *item = &APR_ARRAY_IDX(paths, i, svn_ra_svn_item_t);
>> +
>> + if (item->kind != SVN_RA_SVN_STRING)
>> + return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
>> + _("path is not a string"));
>> + APR_ARRAY_IDX(paths, i, const char *) =
>> + svn_path_canonicalize(item->u.string->data, pool);
>> + }
>> SVN_ERR(trivial_auth_request(conn, pool, b));
>> SVN_CMD_ERR(svn_repos_fs_get_merge_info(&mergeinfo, b->repos, paths, rev,
>> include_parents,
>> @@ -1372,7 +1379,7 @@
>> apr_hash_this(hi, &key, NULL, &value);
>> path = key;
>> info = value;
>> - SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "cc", path, info));
>> + SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "(cc)", path, info));
>> }
>> SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
>> }
>>
>
> I think this portion of the patch needs to be accompanied by changes
> to the protocol document.
>
I think protocol document looks good only the implementation is not
compliant with the protocol doc :)
<snip>
response: ( ( ( path:string merge-info:string) ... ) )
</snip>
Without this patch the implementation looks like
response: ( ( path:string merge-info:string ... ) )

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 30 12:53:52 2006

This is an archived mail posted to the Subversion Dev mailing list.