subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1311568 - /subversion/trunk/subversion/libsvn_delta/compat.c
Date Tue, 10 Apr 2012 04:02:06 GMT
Author: hwright
Date: Tue Apr 10 04:02:05 2012
New Revision: 1311568

URL: http://svn.apache.org/viewvc?rev=1311568&view=rev
Log:
Ev2 shims: Don't universally attempt to de-url-ify copyfrom_paths, as they
are not universally URLs.  This leaves 12 failing tests.

* subversion/libsvn_delta/compat.c
  (map_to_repos_relpath): DTRT when handling various types of paths.
  (build): Only construct the appropriate URL if we have a repos_root.

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1311568&r1=1311567&r2=1311568&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Apr 10 04:02:05 2012
@@ -627,7 +627,17 @@ map_to_repos_relpath(struct ev2_edit_bat
   SVN_DBG(("repos_path='%s'\n", path_or_url));
 #endif
 
-  return svn_uri_skip_ancestor(eb->repos_root, path_or_url, result_pool);
+  if (svn_path_is_url(path_or_url))
+    {
+      return svn_uri_skip_ancestor(eb->repos_root, path_or_url, result_pool);
+    }
+  else
+    {
+      if (path_or_url[0] == '/')
+        return path_or_url + 1;
+      else
+        return path_or_url;
+    }
 }
 
 
@@ -1349,9 +1359,13 @@ build(struct editor_baton *eb,
         operation->kind = kind;
 
       operation->copyfrom_revision = rev;
-      operation->copyfrom_url = svn_path_url_add_component2(eb->repos_root,
-                                                            url,
-                                                            eb->edit_pool);
+
+      if (eb->repos_root)
+        operation->copyfrom_url = svn_path_url_add_component2(eb->repos_root,
+                                                              url,
+                                                              eb->edit_pool);
+      else
+        operation->copyfrom_url = apr_pstrcat(eb->edit_pool, "/", url, NULL);
     }
   /* Handle mkdir operations (which can be adds or replacements). */
   else if (action == ACTION_MKDIR)



Mime
View raw message