
[[[

* subversion/libsvn_ra_local/split_url.c
  (svn_ra_local__split_URL): Treat file:// equivalent to file:///.
   This function used to complain about a missing hostname when
   just passed "file://". But "file://" is the canonical version
   of "file:///", which is equivalent to "file://localhost/".
   skip_uri_scheme() (in subversion/libsvn_subr/path.c) and
   therefore svn_path_is_url() have been considering "file://"
   a valid URL since r14445.

]]]

Index: subversion/libsvn_ra_local/split_url.c
===================================================================
--- subversion/libsvn_ra_local/split_url.c	(revision 31628)
+++ subversion/libsvn_ra_local/split_url.c	(working copy)
@@ -46,25 +46,34 @@ svn_ra_local__split_URL(svn_repos_t **repos,
   /* Then, skip what's between the "file://" prefix and the next
      occurance of '/' -- this is the hostname, and we are considering
      everything from that '/' until the end of the URL to be the
-     absolute path portion of the URL. */
+     absolute path portion of the URL.
+     If we got just "file://", treat it the same as "file:///". */
   hostname = URL + 7;
-  path = strchr(hostname, '/');
-  if (! path)
-    return svn_error_createf
-      (SVN_ERR_RA_ILLEGAL_URL, NULL,
-       _("Local URL '%s' contains only a hostname, no path"), URL);
-
-  /* Treat localhost as an empty hostname. */
-  if (hostname != path)
+  if (*hostname == '\0')
     {
-      hostname = svn_path_uri_decode(apr_pstrmemdup(pool, hostname,
-                                                    path - hostname), pool);
-      if (strncmp(hostname, "localhost", 9) == 0)
-        hostname = NULL;
+      path = "/";
+      hostname = NULL;
     }
   else
-    hostname = NULL;
+    {
+      path = strchr(hostname, '/');
+      if (! path)
+        return svn_error_createf
+          (SVN_ERR_RA_ILLEGAL_URL, NULL,
+           _("Local URL '%s' contains only a hostname, no path"), URL);
 
+      /* Treat localhost as an empty hostname. */
+      if (hostname != path)
+        {
+          hostname = svn_path_uri_decode(apr_pstrmemdup(pool, hostname,
+                                                        path - hostname), pool);
+          if (strncmp(hostname, "localhost", 9) == 0)
+            hostname = NULL;
+        }
+      else
+        hostname = NULL;
+    }
+
   /* Duplicate the URL, starting at the top of the path.
      At the same time, we URI-decode the path. */
 #if defined(WIN32) || defined(__CYGWIN__)

