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

[PATCH] Fix for issue 3438

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: Mon, 29 Jun 2009 21:36:27 +0530

Hi All,
Attached patch fixes issue 3438.

I would like to get some review before committing.

With regards
Kamesh Jayachandran

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2366440

Fix for issue 3438.

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 '/'.

* 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
+ * by appending '/'.
+ */
+ if (copyfrom_path[0] == '/' && copyfrom_path[1] == '\0')
+ copyfrom_path = apr_pstrdup(pool, eb->to_url);
+ 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:08:14 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.