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

Re: [PATCH] Fix for issue 3438

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 29 Jun 2009 17:17:43 +0100

On Mon, Jun 29, 2009 at 09:36:27PM +0530, Kamesh Jayachandran wrote:
> Hi All,
> Attached patch fixes issue 3438.
>
> I would like to get some review before committing.
>
> With regards
> Kamesh Jayachandran
>
>
> svnsync fails while syncing a rev that has copy of '/' over ra_neon and ra_serf
>
> * subversion/svnsync/main.c
> (add_directory): Do not *uncanonicalize* the copyfrom_path if the original
> copyfrom_path(relpath version) is just '/'.

Heh what a silly bug :)

> * subversion/tests/cmdline/svnsync_tests.py
> (test_list): Remove XFail marker on commit_a_copy_of_root.

> Index: subversion/svnsync/main.c
> ===================================================================
> --- subversion/svnsync/main.c (revision 38222)
> +++ subversion/svnsync/main.c (working copy)
> @@ -947,8 +947,16 @@
> node_baton_t *b = apr_palloc(pool, sizeof(*b));
>
> if (copyfrom_path)
> - copyfrom_path = apr_psprintf(pool, "%s%s", eb->to_url,
> - svn_path_uri_encode(copyfrom_path, pool));
> + {
> + /* if copyfrom_path is '/' do not disturb the canoncicallized url
                                                      ^^^^^^^^^^^^^^^^
That should probably say "canonicalized".

> + * by appending '/'.
> + */
> + if (copyfrom_path[0] == '/' && copyfrom_path[1] == '\0')
> + copyfrom_path = apr_pstrdup(pool, eb->to_url);

I'd probably use strcmp() but it's fine this way, too.

Looks good to me.

Stefan

> + else
> + copyfrom_path = apr_psprintf(pool, "%s%s", eb->to_url,
> + svn_path_uri_encode(copyfrom_path, pool));
> + }
>
> SVN_ERR(eb->wrapped_editor->add_directory(path, pb->wrapped_node_baton,
> copyfrom_path,
> Index: subversion/tests/cmdline/svnsync_tests.py
> ===================================================================
> --- subversion/tests/cmdline/svnsync_tests.py (revision 38229)
> +++ subversion/tests/cmdline/svnsync_tests.py (working copy)
> @@ -799,7 +799,7 @@
> info_not_synchronized,
> copy_bad_line_endings,
> delete_svn_props,
> - XFail(commit_a_copy_of_root, svntest.main.is_ra_type_dav),
> + commit_a_copy_of_root,
> ]
>
> if __name__ == '__main__':
Received on 2009-06-29 18:18:03 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.