Author: stefan2
Date: Mon Aug 26 09:21:10 2013
New Revision: 1517474

URL: http://svn.apache.org/r1517474
Log:
On the fsfs-improvements branch: Sync with /trunk up to r1517472.
No conflicts.

Modified:
    subversion/branches/fsfs-improvements/   (props changed)
    
subversion/branches/fsfs-improvements/build/generator/gen_win_dependencies.py
    subversion/branches/fsfs-improvements/subversion/libsvn_client/add.c
    subversion/branches/fsfs-improvements/subversion/libsvn_client/client.h
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/   (props 
changed)
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c
    subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c
    subversion/branches/fsfs-improvements/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/   
(props changed)
    
subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c

Propchange: subversion/branches/fsfs-improvements/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1516632-1517472

Modified: 
subversion/branches/fsfs-improvements/build/generator/gen_win_dependencies.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/build/generator/gen_win_dependencies.py?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- 
subversion/branches/fsfs-improvements/build/generator/gen_win_dependencies.py 
(original)
+++ 
subversion/branches/fsfs-improvements/build/generator/gen_win_dependencies.py 
Mon Aug 26 09:21:10 2013
@@ -1033,10 +1033,12 @@ class GenDependenciesBase(gen_base.Gener
       if version < (1, 3, 0):
         lib_dir = os.path.join(self.serf_path, 'Release')
         debug_lib_dir = os.path.join(self.serf_path, 'Debug')
+        is_src = True
       else:
         lib_dir = self.serf_path
         debug_lib_dir = None
-      is_src = True
+        inc_dir = self.serf_path
+        is_src = False
     elif os.path.isfile(os.path.join(self.serf_path, 'include/serf-1/serf.h')):
       # Install layout
       inc_dir = os.path.join(self.serf_path, 'include/serf-1')

Modified: subversion/branches/fsfs-improvements/subversion/libsvn_client/add.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_client/add.c?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_client/add.c 
(original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_client/add.c Mon 
Aug 26 09:21:10 2013
@@ -1243,35 +1243,34 @@ mkdir_urls(const apr_array_header_t *url
 
 
 svn_error_t *
-svn_client__make_local_parents(const char *path,
+svn_client__make_local_parents(const char *local_abspath,
                                svn_boolean_t make_parents,
                                svn_client_ctx_t *ctx,
-                               apr_pool_t *pool)
+                               apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
   svn_node_kind_t orig_kind;
-  SVN_ERR(svn_io_check_path(path, &orig_kind, pool));
+  SVN_ERR(svn_io_check_path(local_abspath, &orig_kind, scratch_pool));
   if (make_parents)
-    SVN_ERR(svn_io_make_dir_recursively(path, pool));
+    SVN_ERR(svn_io_make_dir_recursively(local_abspath, scratch_pool));
   else
-    SVN_ERR(svn_io_dir_make(path, APR_OS_DEFAULT, pool));
+    SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
 
   /* Should no longer use svn_depth_empty to indicate that only the directory
      itself is added, since it not only constraints the operation depth, but
      also defines the depth of the target directory now. Moreover, the new
      directory will have no children at all.*/
-  err = svn_client_add5(path, svn_depth_infinity, FALSE, FALSE, FALSE,
-                        make_parents, ctx, pool);
+  err = svn_client_add5(local_abspath, svn_depth_infinity, FALSE, FALSE, FALSE,
+                        make_parents, ctx, scratch_pool);
 
   /* If we created a new directory, but couldn't add it to version
      control, then delete it. */
   if (err && (orig_kind == svn_node_none))
     {
-      /* ### If this returns an error, should we link it onto
-         err instead, so that the user is warned that we just
-         created an unversioned directory? */
-
-      svn_error_clear(svn_io_remove_dir2(path, FALSE, NULL, NULL, pool));
+      err = svn_error_compose_create(err,
+                                     svn_io_remove_dir2(local_abspath, FALSE,
+                                                        NULL, NULL,
+                                                        scratch_pool));
     }
 
   return svn_error_trace(err);
@@ -1300,23 +1299,25 @@ svn_client_mkdir4(const apr_array_header
   else
     {
       /* This is a regular "mkdir" + "svn add" */
-      apr_pool_t *subpool = svn_pool_create(pool);
+      apr_pool_t *iterpool = svn_pool_create(pool);
       int i;
 
       for (i = 0; i < paths->nelts; i++)
         {
           const char *path = APR_ARRAY_IDX(paths, i, const char *);
 
-          svn_pool_clear(subpool);
+          svn_pool_clear(iterpool);
 
           /* See if the user wants us to stop. */
           if (ctx->cancel_func)
             SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
+          SVN_ERR(svn_dirent_get_absolute(&path, path, iterpool));
+
           SVN_ERR(svn_client__make_local_parents(path, make_parents, ctx,
-                                                 subpool));
+                                                 iterpool));
         }
-      svn_pool_destroy(subpool);
+      svn_pool_destroy(iterpool);
     }
 
   return SVN_NO_ERROR;

Modified: 
subversion/branches/fsfs-improvements/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_client/client.h?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_client/client.h 
(original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_client/client.h Mon 
Aug 26 09:21:10 2013
@@ -466,10 +466,10 @@ svn_client__wc_delete_many(const apr_arr
                            apr_pool_t *pool);
 
 
-/* Make PATH and add it to the working copy, optionally making all the
-   intermediate parent directories if MAKE_PARENTS is TRUE. */
+/* Make LOCAL_ABSPATH and add it to the working copy, optionally making all
+   the intermediate parent directories if MAKE_PARENTS is TRUE. */
 svn_error_t *
-svn_client__make_local_parents(const char *path,
+svn_client__make_local_parents(const char *local_abspath,
                                svn_boolean_t make_parents,
                                svn_client_ctx_t *ctx,
                                apr_pool_t *pool);

Propchange: subversion/branches/fsfs-improvements/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_fs_x:r1516632-1517472

Modified: 
subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/ra_serf.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/ra_serf.h?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/ra_serf.h 
(original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/ra_serf.h 
Mon Aug 26 09:21:10 2013
@@ -429,6 +429,10 @@ typedef struct svn_ra_serf__handler_t {
      enabled. */
   svn_boolean_t custom_accept_encoding;
 
+  /* If TRUE then default DAV: capabilities request headers is not configured
+     for request. */
+  svn_boolean_t no_dav_headers;
+
   /* Has the request/response been completed?  */
   svn_boolean_t done;
 

Modified: 
subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c 
(original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/update.c 
Mon Aug 26 09:21:10 2013
@@ -1574,6 +1574,7 @@ fetch_file(report_context_t *ctx, report
           handler->session = ctx->sess;
 
           handler->custom_accept_encoding = TRUE;
+          handler->no_dav_headers = TRUE;
           handler->header_delegate = headers_fetch;
           handler->header_delegate_baton = fetch_ctx;
 
@@ -3705,6 +3706,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
           handler->session = session;
 
           handler->custom_accept_encoding = TRUE;
+          handler->no_dav_headers = TRUE;
           handler->header_delegate = headers_fetch;
           handler->header_delegate_baton = stream_ctx;
 

Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c 
(original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c Mon 
Aug 26 09:21:10 2013
@@ -705,6 +705,9 @@ apr_status_t svn_ra_serf__handle_client_
  *
  * If CONTENT_TYPE is not-NULL, it will be sent as the Content-Type header.
  *
+ * If DAV_HEADERS is non-zero, it will add standard DAV capabilites headers
+ * to request.
+ *
  * REQUEST_POOL should live for the duration of the request. Serf will
  * construct this and provide it to the request_setup callback, so we
  * should just use that one.
@@ -717,6 +720,7 @@ setup_serf_req(serf_request_t *request,
                const char *method, const char *url,
                serf_bucket_t *body_bkt, const char *content_type,
                const char *accept_encoding,
+               svn_boolean_t dav_headers,
                apr_pool_t *request_pool,
                apr_pool_t *scratch_pool)
 {
@@ -786,9 +790,12 @@ setup_serf_req(serf_request_t *request,
   /* These headers need to be sent with every request; see issue #3255
      ("mod_dav_svn does not pass client capabilities to start-commit
      hooks") for why. */
-  serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_DEPTH);
-  serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_MERGEINFO);
-  serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_LOG_REVPROPS);
+  if (dav_headers)
+    {
+      serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_DEPTH);
+      serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_MERGEINFO);
+      serf_bucket_headers_setn(*hdrs_bkt, "DAV", 
SVN_DAV_NS_DAV_SVN_LOG_REVPROPS);
+    }
 
   return SVN_NO_ERROR;
 }
@@ -2241,7 +2248,8 @@ setup_request(serf_request_t *request,
   SVN_ERR(setup_serf_req(request, req_bkt, &headers_bkt,
                          handler->session, handler->method, handler->path,
                          body_bkt, handler->body_type, accept_encoding,
-                         request_pool, scratch_pool));
+                         !handler->no_dav_headers, request_pool,
+                         scratch_pool));
 
   if (handler->header_delegate)
     {

Modified: 
subversion/branches/fsfs-improvements/subversion/libsvn_subr/dirent_uri.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/dirent_uri.c?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/dirent_uri.c 
(original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/dirent_uri.c 
Mon Aug 26 09:21:10 2013
@@ -1862,6 +1862,9 @@ svn_uri_is_canonical(const char *uri, ap
 #endif /* SVN_USE_DOS_PATHS */
 
   /* Now validate the rest of the URI. */
+  seg = ptr;
+  while (*ptr && (*ptr != '/'))
+    ptr++;
   while(1)
     {
       apr_size_t seglen = ptr - seg;
@@ -1880,9 +1883,8 @@ svn_uri_is_canonical(const char *uri, ap
 
       if (*ptr == '/')
         ptr++;
-      seg = ptr;
-
 
+      seg = ptr;
       while (*ptr && (*ptr != '/'))
         ptr++;
     }

Propchange: subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1516632-1517472

Modified: 
subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1517474&r1=1517473&r2=1517474&view=diff
==============================================================================
--- 
subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c
 (original)
+++ 
subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/dirent_uri-test.c
 Mon Aug 26 09:21:10 2013
@@ -911,6 +911,9 @@ static const testcase_canonicalize_t uri
     { "file:///C:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///c:/",           "file:///c:" },
 #endif /* SVN_USE_DOS_PATHS */
+    /* Hostnames that look like non-canonical paths */
+    { "file://./foo",             "file://./foo" },
+    { "http://./foo";,             "http://./foo"; },
   /* svn_uri_is_canonical() was a private function in the 1.6 API, and
      has since taken a MAJOR change of direction, namely that only
      absolute URLs are considered canonical uris now. */


Reply via email to