Daniel Rall wrote:
> Kamesh, this works great! I noticed that it doesn't use the RA
> session reparenting suggested by Peter Lundblad -- any particular
> reason for that?
Yes. After sending the patch last week, I thought of trying reparent
api, but could not do so.
Yes, reparenting is the way to go.
Find the attached patch.
> Also, there's some error handling in
> get_implied_merge_info() to account for locally-added but uncommitted
> versioned resources; is it still correct as written (e.g. do we still
> need the test for SVN_ERR_RA_DAV_REQUEST_FAILED)? Seems a little odd
>
Yes we still need this.
In this case ra_dav layer returns 'SVN_ERR_RA_DAV_PATH_NOT_FOUND' not
'SVN_ERR_RA_DAV_REQUEST_FAILED'.
> that there's no special-casing for ra_svn's protocol.
>
ra_svn returns SVN_ERR_FS_NOT_FOUND like ra_local. So no need to special
case.
With regards
Kamesh Jayachandran
[[[
Fix copy_tests-11 failure.
* subversion/libsvn_client/copy.c
(get_implied_merge_info, calculate_target_merge_info):
Remove FIXME marker.
(wc_to_repos_copy):
Remove FIXME marker.
Reparent the ra_session to repos_root, so that subsequent svn_ra_get_log
on paths relative to repository root would be successful.
* subversion/tests/cmdline/copy_tests.py
(wc_to_repos): Don't skip for ra_dav.
Patch by: kameshj
]]]
Index: subversion/tests/cmdline/copy_tests.py
===================================================================
--- subversion/tests/cmdline/copy_tests.py (revision 24185)
+++ subversion/tests/cmdline/copy_tests.py (working copy)
@@ -856,10 +856,6 @@
def wc_to_repos(sbox):
"working-copy to repository copy"
- ### FIXME: This test is currently failing over ra_dav.
- if svntest.main.is_ra_type_dav():
- raise svntest.Skip
-
sbox.build()
wc_dir = sbox.wc_dir
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 24185)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -390,9 +390,6 @@
was created (copied or added). */
err = svn_ra_get_log(ra_session, rel_paths, 1, rev, 1, FALSE, TRUE,
revnum_receiver, &oldest_rev, pool);
- /* ### FIXME: ra_dav may fail with SVN_ERR_RA_DAV_PATH_NOT_FOUND.
- ### This is possibly related to path construction mentioned in
- ### calculate_target_merge_info()... */
if (err)
{
if (err->apr_err == SVN_ERR_FS_NOT_FOUND ||
@@ -441,10 +438,6 @@
pool));
/* Obtain any implied and/or existing (explicit) merge info. */
- /* ### FIXME: May fail with SVN_ERR_RA_DAV_PATH_NOT_FOUND over
- ### ra_dav, because we're providing a path relative to the
- ### repository root instead of the ra_session (which may've been
- ### opened to a path somewhere under the root). */
SVN_ERR(get_implied_merge_info(ra_session, target_mergeinfo,
src_rel_path, src_path, src_revnum, pool));
SVN_ERR(svn_client__get_merge_info_for_path(ra_session, &src_mergeinfo,
@@ -960,7 +953,7 @@
{
const char *message;
apr_hash_t *revprop_table;
- const char *top_src_path, *top_dst_url;
+ const char *top_src_path, *top_dst_url, *repos_root;
svn_ra_session_t *ra_session;
const svn_delta_editor_t *editor;
void *edit_baton;
@@ -1017,8 +1010,6 @@
svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *);
- /* ### FIXME: I want the path relative to the ra_session
- ### instead. */
SVN_ERR(svn_client__path_relative_to_root(&pair->src_rel, pair->src,
NULL, ra_session, adm_access,
pool));
@@ -1092,6 +1083,11 @@
APR_HASH_KEY_STRING)))
goto cleanup;
+ /* Reparent the ra_session to repos_root. So that 'svn_ra_get_log'
+ on paths relative to repos_root would work fine. */
+ SVN_ERR(svn_ra_get_repos_root(ra_session, &repos_root, pool));
+ SVN_ERR(svn_ra_reparent(ra_session, repos_root, pool));
+
/* ### TODO: This extra loop would be unnecessary if this code lived
### in svn_client__get_copy_committables(), which is incidentally
### only used above (so should really be in this source file). */
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 27 15:50:43 2007