Author: cmpilato
Date: Thu Oct 11 20:46:52 2012
New Revision: 1397299

URL: http://svn.apache.org/viewvc?rev=1397299&view=rev
Log:
Sync the 'http-dynamic-prop-namespaces' branch with recent trunk changes.
(Merged /subversion/trunk:r1397055-1397298.)

Modified:
    subversion/branches/http-dynamic-prop-namespaces/   (props changed)
    
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_mergeinfo_private.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_ra_private.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_string_private.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_wc_private.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_config.h
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cat.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/commit_util.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/copy.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/mergeinfo.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/update.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra/ra_loader.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/xml.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/mergeinfo.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/string.c
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/node.c
    
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/copy_tests.py

Propchange: subversion/branches/http-dynamic-prop-namespaces/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1397055-1397298

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_mergeinfo_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_mergeinfo_private.h?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_mergeinfo_private.h
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_mergeinfo_private.h
 Thu Oct 11 20:46:52 2012
@@ -125,20 +125,6 @@ svn_mergeinfo__add_prefix_to_catalog(svn
                                      apr_pool_t *result_pool,
                                      apr_pool_t *scratch_pool);
 
-/* Set *OUT_MERGEINFO to a shallow copy of MERGEINFO with each source path
-   converted to a (URI-encoded) URL based on REPOS_ROOT_URL. *OUT_MERGEINFO
-   is declared as 'apr_hash_t *' because its key do not obey the rules of
-   'svn_mergeinfo_t'.
-
-   Allocate *OUT_MERGEINFO and the new keys in RESULT_POOL.  Use
-   SCRATCH_POOL for any temporary allocations. */
-svn_error_t *
-svn_mergeinfo__relpaths_to_urls(apr_hash_t **out_mergeinfo,
-                                svn_mergeinfo_t mergeinfo,
-                                const char *repos_root_url,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool);
-
 /* Set *OUT_MERGEINFO to a shallow copy of MERGEINFO with the relpath
    SUFFIX_RELPATH added to the end of each key path.
 
@@ -170,20 +156,6 @@ svn_mergeinfo__catalog_to_formatted_stri
                                            const char *val_prefix,
                                            apr_pool_t *pool);
 
-/* Create a string representation of MERGEINFO in *OUTPUT, allocated in POOL.
-   Unlike svn_mergeinfo_to_string(), NULL MERGEINFO is tolerated and results
-   in *OUTPUT set to "\n".  If SVN_DEBUG is true, then NULL or empty MERGEINFO
-   causes *OUTPUT to be set to an appropriate newline terminated string.  If
-   PREFIX is not NULL then prepend PREFIX to each line in *OUTPUT.
-
-   Any relative merge source paths in MERGEINFO are converted to absolute
-   paths in *OUTPUT.*/
-svn_error_t *
-svn_mergeinfo__to_formatted_string(svn_string_t **output,
-                                   svn_mergeinfo_t mergeinfo,
-                                   const char *prefix,
-                                   apr_pool_t *pool);
-
 /* Set *YOUNGEST_REV and *OLDEST_REV to the youngest and oldest revisions
    found in the rangelists within MERGEINFO.  Note that *OLDEST_REV is
    exclusive and *YOUNGEST_REV is inclusive.  If MERGEINFO is NULL or empty

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_ra_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_ra_private.h?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_ra_private.h
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_ra_private.h
 Thu Oct 11 20:46:52 2012
@@ -119,16 +119,6 @@ svn_ra__release_operational_lock(svn_ra_
                                  const svn_string_t *mylocktoken,
                                  apr_pool_t *scratch_pool);
 
-
-/** Like svn_ra_get_path_relative_to_root(), except returning a fspath
- * (starting with '/') instead of a relpath.
- */
-svn_error_t *
-svn_ra__get_fspath_relative_to_root(svn_ra_session_t *ra_session,
-                                    const char **fspath,
-                                    const char *url,
-                                    apr_pool_t *pool);
-
 /** Register CALLBACKS to be used with the Ev2 shims in RA_SESSION. */
 svn_error_t *
 svn_ra__register_editor_shim_callbacks(svn_ra_session_t *ra_session,

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_string_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_string_private.h?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_string_private.h
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_string_private.h
 Thu Oct 11 20:46:52 2012
@@ -88,7 +88,7 @@ svn__ui64toa_sep(apr_uint64_t number, ch
  * the @a seperator at each third place.
  */
 char *
-svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool);
+svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool);
 
 /** @} */
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_wc_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_wc_private.h?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_wc_private.h
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/private/svn_wc_private.h
 Thu Oct 11 20:46:52 2012
@@ -557,42 +557,25 @@ svn_wc__node_get_deleted_ancestor(const 
                                   apr_pool_t *scratch_pool);
 
 /**
- * Set @a *is_server_excluded to whether @a local_abspath has been
- * excluded by the server, using @a wc_ctx.  If @a local_abspath is not
- * in the working copy, return @c SVN_ERR_WC_PATH_NOT_FOUND.
- * Use @a scratch_pool for all temporary allocations.
- */
-svn_error_t *
-svn_wc__node_is_status_server_excluded(svn_boolean_t *is_server_excluded,
-                                       svn_wc_context_t *wc_ctx,
-                                       const char *local_abspath,
-                                       apr_pool_t *scratch_pool);
-
-/**
- * Set @a *is_not_present to whether the status of @a local_abspath is
- * #svn_wc__db_status_not_present, using @a wc_ctx.
- * If @a local_abspath is not in the working copy, return
- * @c SVN_ERR_WC_PATH_NOT_FOUND.  Use @a scratch_pool for all temporary
- * allocations.
- */
-svn_error_t *
-svn_wc__node_is_status_not_present(svn_boolean_t *is_not_present,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *local_abspath,
-                                   apr_pool_t *scratch_pool);
-
-/**
- * Set @a *is_excluded to whether the status of @a local_abspath is
- * #svn_wc__db_status_excluded, using @a wc_ctx.
+ * Set @a *not_present to TRUE when @a local_abspath has status
+ * svn_wc__db_status_not_present. Set @a *user_excluded to TRUE when
+ * @a local_abspath has status svn_wc__db_status_excluded. Set
+ * @a *server_excluded to TRUE when @a local_abspath has status
+ * svn_wc__db_status_server_excluded. Otherwise set these values to FALSE.
+ *
+ * If a value is not interesting you can pass #NULL.
+ *
  * If @a local_abspath is not in the working copy, return
  * @c SVN_ERR_WC_PATH_NOT_FOUND.  Use @a scratch_pool for all temporary
  * allocations.
  */
 svn_error_t *
-svn_wc__node_is_status_excluded(svn_boolean_t *is_excluded,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *local_abspath,
-                                   apr_pool_t *scratch_pool);
+svn_wc__node_is_not_present(svn_boolean_t *not_present,
+                            svn_boolean_t *user_excluded,
+                            svn_boolean_t *server_excluded,
+                            svn_wc_context_t *wc_ctx,
+                            const char *local_abspath,
+                            apr_pool_t *scratch_pool);
 
 /**
  * Set @a *is_added to whether @a local_abspath is added, using

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_config.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_config.h?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_config.h
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/include/svn_config.h
 Thu Oct 11 20:46:52 2012
@@ -108,6 +108,7 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_OPTION_GLOBAL_IGNORES            "global-ignores"
 #define SVN_CONFIG_OPTION_LOG_ENCODING              "log-encoding"
 #define SVN_CONFIG_OPTION_USE_COMMIT_TIMES          "use-commit-times"
+/** @deprecated Not used by Subversion since 2003/r847039 (well before 1.0) */
 #define SVN_CONFIG_OPTION_TEMPLATE_ROOT             "template-root"
 #define SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS         "enable-auto-props"
 #define SVN_CONFIG_OPTION_NO_UNLOCK                 "no-unlock"

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cat.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cat.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cat.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/cat.c 
Thu Oct 11 20:46:52 2012
@@ -62,7 +62,6 @@ svn_client__get_normalized_stream(svn_st
   svn_string_t *eol_style, *keywords, *special;
   const char *eol = NULL;
   svn_boolean_t local_mod = FALSE;
-  apr_time_t tm;
   svn_stream_t *input;
   svn_node_kind_t kind;
 
@@ -118,27 +117,15 @@ svn_client__get_normalized_stream(svn_st
   if (eol_style)
     svn_subst_eol_style_from_value(&style, &eol, eol_style->data);
 
-  if (local_mod && (! special))
-    {
-      /* Use the modified time from the working copy if
-         the file */
-      SVN_ERR(svn_io_file_affected_time(&tm, local_abspath, scratch_pool));
-    }
-  else
-    {
-      SVN_ERR(svn_wc__node_get_changed_info(NULL, &tm, NULL, wc_ctx,
-                                            local_abspath, scratch_pool,
-                                            scratch_pool));
-    }
-
   if (keywords)
     {
       svn_revnum_t changed_rev;
       const char *rev_str;
       const char *author;
       const char *url;
+      apr_time_t tm;
 
-      SVN_ERR(svn_wc__node_get_changed_info(&changed_rev, NULL, &author, 
wc_ctx,
+      SVN_ERR(svn_wc__node_get_changed_info(&changed_rev, &tm, &author, wc_ctx,
                                             local_abspath, scratch_pool,
                                             scratch_pool));
       SVN_ERR(svn_wc__node_get_url(&url, wc_ctx, local_abspath, scratch_pool,
@@ -152,6 +139,13 @@ svn_client__get_normalized_stream(svn_st
              current user's username */
           rev_str = apr_psprintf(scratch_pool, "%ldM", changed_rev);
           author = _("(local)");
+
+          if (! special)
+            {
+              /* Use the modified time from the working copy for files */
+              SVN_ERR(svn_io_file_affected_time(&tm, local_abspath,
+                                                scratch_pool));
+            }
         }
       else
         {

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/commit_util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/commit_util.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/commit_util.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/commit_util.c
 Thu Oct 11 20:46:52 2012
@@ -482,8 +482,8 @@ harvest_not_present_for_copy(svn_wc_cont
 
       svn_pool_clear(iterpool);
 
-      SVN_ERR(svn_wc__node_is_status_not_present(&not_present, wc_ctx,
-                                                  this_abspath, scratch_pool));
+      SVN_ERR(svn_wc__node_is_not_present(&not_present, NULL, NULL, wc_ctx,
+                                          this_abspath, scratch_pool));
 
       if (!not_present)
         continue;

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/copy.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/copy.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/copy.c
 Thu Oct 11 20:46:52 2012
@@ -397,11 +397,30 @@ verify_wc_srcs_and_dsts(const apr_array_
       /* If DST_PATH does not exist, then its basename will become a new
          file or dir added to its parent (possibly an implicit '.').
          Else, just error out. */
-      SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind,
-                                iterpool));
+      SVN_ERR(svn_wc_read_kind(&dst_kind, ctx->wc_ctx,
+                               pair->dst_abspath_or_url, TRUE /* show_hidden 
*/,
+                               iterpool));
       if (dst_kind != svn_node_none)
         {
-          if (is_move
+          svn_boolean_t is_not_present;
+          svn_boolean_t is_excluded;
+          svn_boolean_t is_server_excluded;
+
+          SVN_ERR(svn_wc__node_is_not_present(&is_not_present, &is_excluded,
+                                              &is_server_excluded, ctx->wc_ctx,
+                                              pair->dst_abspath_or_url,
+                                              iterpool));
+
+          if (is_excluded || is_server_excluded)
+            {
+              return svn_error_createf(
+                  SVN_ERR_WC_OBSTRUCTED_UPDATE,
+                  NULL, _("Path '%s' exists, but is excluded"),
+                  svn_dirent_local_style(pair->dst_abspath_or_url, iterpool));
+            }
+
+          if ((! is_not_present)
+              && is_move
               && copy_pairs->nelts == 1
               && strcmp(svn_dirent_dirname(pair->src_abspath_or_url, iterpool),
                         svn_dirent_dirname(pair->dst_abspath_or_url,
@@ -440,10 +459,20 @@ verify_wc_srcs_and_dsts(const apr_array_
                 }
             }
 
-          return svn_error_createf(
-                      SVN_ERR_ENTRY_EXISTS, NULL,
-                      _("Path '%s' already exists"),
-                      svn_dirent_local_style(pair->dst_abspath_or_url, pool));
+          if (! is_not_present)
+            {
+              svn_boolean_t is_deleted;
+
+              SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, ctx->wc_ctx,
+                                                     pair->dst_abspath_or_url, 
pool));
+
+              if (! is_deleted)
+                return svn_error_createf(
+                            SVN_ERR_ENTRY_EXISTS, NULL,
+                            _("Path '%s' already exists"),
+                            svn_dirent_local_style(pair->dst_abspath_or_url,
+                                                   pool));
+            }
         }
 
       svn_dirent_split(&pair->dst_parent_abspath, &pair->base_name,
@@ -1621,13 +1650,15 @@ repos_to_wc_copy_locked(const apr_array_
       svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
                                                     svn_client__copy_pair_t *);
       svn_node_kind_t kind;
+      svn_boolean_t is_not_present;
       svn_boolean_t is_excluded;
       svn_boolean_t is_server_excluded;
+      svn_boolean_t is_deleted;
 
       svn_pool_clear(iterpool);
 
       SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, pair->dst_abspath_or_url,
-                               FALSE, iterpool));
+                               TRUE /* show_hidden */, iterpool));
       if (kind == svn_node_none)
         continue;
 
@@ -1635,48 +1666,34 @@ repos_to_wc_copy_locked(const apr_array_
          ### simplify the conditions? */
 
       /* Hidden by client exclusion */
-      SVN_ERR(svn_wc__node_is_status_excluded(&is_excluded, ctx->wc_ctx,
-                                              pair->dst_abspath_or_url,
-                                              iterpool));
-      if (is_excluded)
-        {
-          return svn_error_createf
-            (SVN_ERR_ENTRY_EXISTS,
-             NULL, _("'%s' is already under version control"),
-             svn_dirent_local_style(pair->dst_abspath_or_url, iterpool));
-        }
+      SVN_ERR(svn_wc__node_is_not_present(&is_not_present, &is_excluded,
+                                          &is_server_excluded, ctx->wc_ctx,
+                                          pair->dst_abspath_or_url,
+                                          iterpool));
 
-      /* Hidden by server exclusion (not authorized) */
-      SVN_ERR(svn_wc__node_is_status_server_excluded(&is_server_excluded,
-                                                     ctx->wc_ctx,
-                                                     pair->dst_abspath_or_url,
-                                                     iterpool));
-      if (is_server_excluded)
-        {
-          return svn_error_createf
-            (SVN_ERR_ENTRY_EXISTS,
-             NULL, _("'%s' is already under version control"),
+      if (is_not_present)
+        continue;
+
+      if (is_excluded || is_server_excluded)
+        {
+          return svn_error_createf(
+             SVN_ERR_WC_OBSTRUCTED_UPDATE,
+             NULL, _("Path '%s' exists, but is excluded"),
              svn_dirent_local_style(pair->dst_abspath_or_url, iterpool));
         }
 
       /* Working file missing to something other than being scheduled
          for addition or in "deleted" state. */
-      if (kind != svn_node_dir)
-        {
-          svn_boolean_t is_deleted;
-          svn_boolean_t is_not_present;
 
-          SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, ctx->wc_ctx,
-                                                 pair->dst_abspath_or_url,
-                                                 iterpool));
-          SVN_ERR(svn_wc__node_is_status_not_present(&is_not_present,
-                                                     ctx->wc_ctx,
-                                                     pair->dst_abspath_or_url,
-                                                     iterpool));
-          if ((! is_deleted) && (! is_not_present))
-            return svn_error_createf
-              (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
-               _("Entry for '%s' exists (though the working file is missing)"),
+      SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, ctx->wc_ctx,
+                                             pair->dst_abspath_or_url,
+                                             iterpool));
+
+      if (! is_deleted)
+        {
+          return svn_error_createf(
+               SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
+               _("Path '%s' exists, but the working file is missing"),
                svn_dirent_local_style(pair->dst_abspath_or_url, iterpool));
         }
     }

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/merge.c
 Thu Oct 11 20:46:52 2012
@@ -1883,7 +1883,7 @@ merge_file_added(svn_wc_notify_state_t *
             svn_revnum_t copyfrom_rev;
             svn_stream_t *new_contents, *new_base_contents;
             apr_hash_t *new_base_props, *new_props;
-            const svn_wc_conflict_description2_t *existing_conflict;
+            svn_boolean_t existing_tree_conflict;
             svn_error_t *err;
 
             /* If this is a merge from the same repository as our
@@ -1920,10 +1920,9 @@ merge_file_added(svn_wc_notify_state_t *
                                                  scratch_pool, scratch_pool));
               }
 
-            err = svn_wc__get_tree_conflict(&existing_conflict,
-                                            merge_b->ctx->wc_ctx,
-                                            mine_abspath, merge_b->pool,
-                                            merge_b->pool);
+            err = svn_wc_conflicted_p3(NULL, NULL, &existing_tree_conflict,
+                                       merge_b->ctx->wc_ctx, mine_abspath,
+                                       merge_b->pool);
 
             if (err)
               {
@@ -1931,10 +1930,10 @@ merge_file_added(svn_wc_notify_state_t *
                   return svn_error_trace(err);
 
                 svn_error_clear(err);
-                existing_conflict = FALSE;
+                existing_tree_conflict = FALSE;
               }
 
-            if (existing_conflict)
+            if (existing_tree_conflict)
               {
                 svn_boolean_t moved_here;
                 svn_wc_conflict_reason_t reason;

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/mergeinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/mergeinfo.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/mergeinfo.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/mergeinfo.c
 Thu Oct 11 20:46:52 2012
@@ -1572,6 +1572,44 @@ logs_for_mergeinfo_rangelist(const char 
 
   return SVN_NO_ERROR;
 }
+
+/* Set *OUT_MERGEINFO to a shallow copy of MERGEINFO with each source path
+   converted to a (URI-encoded) URL based on REPOS_ROOT_URL. *OUT_MERGEINFO
+   is declared as 'apr_hash_t *' because its key do not obey the rules of
+   'svn_mergeinfo_t'.
+
+   Allocate *OUT_MERGEINFO and the new keys in RESULT_POOL.  Use
+   SCRATCH_POOL for any temporary allocations. */
+static svn_error_t *
+mergeinfo_relpaths_to_urls(apr_hash_t **out_mergeinfo,
+                           svn_mergeinfo_t mergeinfo,
+                           const char *repos_root_url,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
+{
+  *out_mergeinfo = NULL;
+  if (mergeinfo)
+    {
+      apr_hash_index_t *hi;
+      apr_hash_t *full_path_mergeinfo = apr_hash_make(result_pool);
+
+      for (hi = apr_hash_first(scratch_pool, mergeinfo);
+           hi; hi = apr_hash_next(hi))
+        {
+          const char *key = svn__apr_hash_index_key(hi);
+          void *val = svn__apr_hash_index_val(hi);
+
+          apr_hash_set(full_path_mergeinfo,
+                       svn_path_url_add_component2(repos_root_url, key + 1,
+                                                   result_pool),
+                       APR_HASH_KEY_STRING, val);
+        }
+      *out_mergeinfo = full_path_mergeinfo;
+    }
+
+  return SVN_NO_ERROR;
+}
+
 
 /*** Public APIs ***/
 
@@ -1614,8 +1652,8 @@ svn_client_mergeinfo_get_merged(apr_hash
       mergeinfo = NULL;
     }
 
-  SVN_ERR(svn_mergeinfo__relpaths_to_urls(mergeinfo_p, mergeinfo,
-                                          repos_root, pool, pool));
+  SVN_ERR(mergeinfo_relpaths_to_urls(mergeinfo_p, mergeinfo,
+                                     repos_root, pool, pool));
   return SVN_NO_ERROR;
 }
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/update.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/update.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/update.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_client/update.c
 Thu Oct 11 20:46:52 2012
@@ -200,7 +200,6 @@ update_internal(svn_revnum_t *result_rev
   svn_boolean_t sleep_here = FALSE;
   svn_boolean_t *use_sleep = timestamp_sleep ? timestamp_sleep : &sleep_here;
   svn_boolean_t clean_checkout = FALSE;
-  svn_boolean_t is_not_present;
   const char *diff3_cmd;
   apr_hash_t *wcroot_iprops;
   svn_opt_revision_t opt_rev;
@@ -461,19 +460,6 @@ update_internal(svn_revnum_t *result_rev
                                            ctx, pool));
     }
 
-  /* Cache inherited props. */
-  err = svn_wc__node_is_status_not_present(&is_not_present, ctx->wc_ctx,
-                                           local_abspath, pool);
-  if (err)
-    {
-      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-        return svn_error_trace(err);
-
-      svn_error_clear(err);
-      err = SVN_NO_ERROR;
-      is_not_present = TRUE;
-    }
-
   if (sleep_here)
     svn_io_sleep_for_timestamps(local_abspath, pool);
 

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra/ra_loader.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra/ra_loader.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra/ra_loader.c
 Thu Oct 11 20:46:52 2012
@@ -580,22 +580,6 @@ svn_error_t *svn_ra_get_path_relative_to
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_ra__get_fspath_relative_to_root(svn_ra_session_t *ra_session,
-                                    const char **fspath,
-                                    const char *url,
-                                    apr_pool_t *pool)
-{
-  const char *relpath;
-
-  SVN_ERR(svn_ra_get_path_relative_to_root(ra_session, &relpath, url, pool));
-  if (*relpath)
-    *fspath = apr_pstrcat(pool, "/", relpath, (char *)NULL);
-  else
-    *fspath = "/";
-  return SVN_NO_ERROR;
-}
-
 svn_error_t *svn_ra_get_latest_revnum(svn_ra_session_t *session,
                                       svn_revnum_t *latest_revnum,
                                       apr_pool_t *pool)

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/xml.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/xml.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/xml.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/xml.c
 Thu Oct 11 20:46:52 2012
@@ -205,9 +205,23 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_
             }
         }
     }
+  else
+    {
+      const svn_ra_serf__ns_t *ns;
+
+      for (ns = ns_list; ns; ns = ns->next)
+        {
+          if (! ns->namespace[0])
+            {
+              returned_prop_name->namespace = ns->url;
+              returned_prop_name->name = name;
+              return;
+            }
+        }
+    }    
 
-  /* If there is no prefix, or if the prefix is not found, then the
-     name is NOT within a namespace.  */
+  /* If the prefix is not found, then the name is NOT within a
+     namespace.  */
   returned_prop_name->namespace = "";
   returned_prop_name->name = name;
 }

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/mergeinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/mergeinfo.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/mergeinfo.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/mergeinfo.c
 Thu Oct 11 20:46:52 2012
@@ -2197,36 +2197,6 @@ svn_mergeinfo__add_prefix_to_catalog(svn
 }
 
 svn_error_t *
-svn_mergeinfo__relpaths_to_urls(apr_hash_t **out_mergeinfo,
-                                svn_mergeinfo_t mergeinfo,
-                                const char *repos_root_url,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool)
-{
-  *out_mergeinfo = NULL;
-  if (mergeinfo)
-    {
-      apr_hash_index_t *hi;
-      apr_hash_t *full_path_mergeinfo = apr_hash_make(result_pool);
-
-      for (hi = apr_hash_first(scratch_pool, mergeinfo);
-           hi; hi = apr_hash_next(hi))
-        {
-          const char *key = svn__apr_hash_index_key(hi);
-          void *val = svn__apr_hash_index_val(hi);
-
-          apr_hash_set(full_path_mergeinfo,
-                       svn_path_url_add_component2(repos_root_url, key + 1,
-                                                   result_pool),
-                       APR_HASH_KEY_STRING, val);
-        }
-      *out_mergeinfo = full_path_mergeinfo;
-    }
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
 svn_mergeinfo__add_suffix_to_mergeinfo(svn_mergeinfo_t *out_mergeinfo,
                                        svn_mergeinfo_t mergeinfo,
                                        const char *suffix_relpath,
@@ -2359,38 +2329,6 @@ svn_mergeinfo__catalog_to_formatted_stri
 }
 
 svn_error_t *
-svn_mergeinfo__to_formatted_string(svn_string_t **output,
-                                   svn_mergeinfo_t mergeinfo,
-                                   const char *prefix,
-                                   apr_pool_t *pool)
-{
-  svn_stringbuf_t *output_buf = NULL;
-
-  if (mergeinfo && apr_hash_count(mergeinfo))
-    {
-      SVN_ERR(mergeinfo_to_stringbuf(&output_buf, mergeinfo,
-                                     prefix ? prefix : "", pool));
-      svn_stringbuf_appendcstr(output_buf, "\n");
-    }
-#if SVN_DEBUG
-  else if (!mergeinfo)
-    {
-      output_buf = svn_stringbuf_create(prefix ? prefix : "", pool);
-      svn_stringbuf_appendcstr(output_buf, _("NULL mergeinfo\n"));
-    }
-  else if (apr_hash_count(mergeinfo) == 0)
-    {
-      output_buf = svn_stringbuf_create(prefix ? prefix : "", pool);
-      svn_stringbuf_appendcstr(output_buf, _("empty mergeinfo\n"));
-    }
-#endif
-
-  *output = output_buf ? svn_stringbuf__morph_into_string(output_buf)
-                       : svn_string_create_empty(pool);
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
 svn_mergeinfo__get_range_endpoints(svn_revnum_t *youngest_rev,
                                    svn_revnum_t *oldest_rev,
                                    svn_mergeinfo_t mergeinfo,

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/string.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/string.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/string.c
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_subr/string.c
 Thu Oct 11 20:46:52 2012
@@ -1120,7 +1120,7 @@ svn__ui64toa_sep(apr_uint64_t number, ch
 }
 
 char *
-svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool)
+svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool)
 {
   char buffer[2 * SVN_INT64_BUFFER_SIZE];
   if (number < 0)

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/info.c 
Thu Oct 11 20:46:52 2012
@@ -476,25 +476,25 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
       && fetch_actual_only
       && err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
     {
-      const svn_wc_conflict_description2_t *root_tree_conflict;
+      svn_boolean_t tree_conflicted;
       svn_error_t *err2;
 
-      err2 = svn_wc__get_tree_conflict(&root_tree_conflict,
-                                       wc_ctx, local_abspath,
-                                       scratch_pool, iterpool);
+      err2 = svn_wc__internal_conflicted_p(NULL, NULL, &tree_conflicted,
+                                           wc_ctx->db, local_abspath,
+                                           iterpool);
 
       if ((err2 && err2->apr_err == SVN_ERR_WC_PATH_NOT_FOUND))
         {
           svn_error_clear(err2);
           return svn_error_trace(err);
         }
-      else if (err2 || !root_tree_conflict)
+      else if (err2 || !tree_conflicted)
         return svn_error_compose_create(err, err2);
 
       svn_error_clear(err);
 
       apr_hash_set(fe_baton.tree_conflicts, local_abspath,
-                   APR_HASH_KEY_STRING, root_tree_conflict);
+                   APR_HASH_KEY_STRING, "");
     }
   else
     SVN_ERR(err);

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/node.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/node.c?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/node.c 
(original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_wc/node.c 
Thu Oct 11 20:46:52 2012
@@ -768,30 +768,12 @@ svn_wc__node_get_deleted_ancestor(const 
 }
 
 svn_error_t *
-svn_wc__node_is_status_server_excluded(svn_boolean_t *is_server_excluded,
-                                       svn_wc_context_t *wc_ctx,
-                                       const char *local_abspath,
-                                       apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-
-  SVN_ERR(svn_wc__db_read_info(&status,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL,
-                               wc_ctx->db, local_abspath,
-                               scratch_pool, scratch_pool));
-  *is_server_excluded = (status == svn_wc__db_status_server_excluded);
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__node_is_status_not_present(svn_boolean_t *is_not_present,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *local_abspath,
-                                   apr_pool_t *scratch_pool)
+svn_wc__node_is_not_present(svn_boolean_t *is_not_present,
+                            svn_boolean_t *is_excluded,
+                            svn_boolean_t *is_server_excluded,
+                            svn_wc_context_t *wc_ctx,
+                            const char *local_abspath,
+                            apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
 
@@ -802,27 +784,15 @@ svn_wc__node_is_status_not_present(svn_b
                                NULL, NULL, NULL, NULL, NULL,
                                wc_ctx->db, local_abspath,
                                scratch_pool, scratch_pool));
-  *is_not_present = (status == svn_wc__db_status_not_present);
 
-  return SVN_NO_ERROR;
-}
+  if (is_not_present)
+    *is_not_present = (status == svn_wc__db_status_not_present);
 
-svn_error_t *
-svn_wc__node_is_status_excluded(svn_boolean_t *is_excluded,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *local_abspath,
-                                   apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
+  if (is_excluded)
+    *is_excluded = (status == svn_wc__db_status_excluded);
 
-  SVN_ERR(svn_wc__db_read_info(&status,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL,
-                               wc_ctx->db, local_abspath,
-                               scratch_pool, scratch_pool));
-  *is_excluded = (status == svn_wc__db_status_excluded);
+  if (is_server_excluded)
+    *is_server_excluded = (status == svn_wc__db_status_server_excluded);
 
   return SVN_NO_ERROR;
 }

Modified: 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/copy_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/copy_tests.py?rev=1397299&r1=1397298&r2=1397299&view=diff
==============================================================================
--- 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/copy_tests.py
 (original)
+++ 
subversion/branches/http-dynamic-prop-namespaces/subversion/tests/cmdline/copy_tests.py
 Thu Oct 11 20:46:52 2012
@@ -5742,6 +5742,30 @@ def copy_text_conflict(sbox):
   })
   svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
 
+@Issue(2843)
+def copy_over_excluded(sbox):
+  "copy on top of excluded should give error"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'update', '--set-depth', 'exclude',
+                                     sbox.ospath('A/D'))
+
+  expected_error = "svn: E155000: Path '.*D' exists.*excluded.*"
+
+  svntest.actions.run_and_verify_svn(None, None, expected_error,
+                                     'cp',
+                                       sbox.repo_url + '/A/C',
+                                       sbox.ospath('A/D'))
+
+  expected_error = "svn: E155000: Path '.*D' exists.*excluded.*"
+  svntest.actions.run_and_verify_svn(None, None, expected_error,
+                                     'cp',
+                                       sbox.ospath('A/C'),
+                                       sbox.ospath('A/D'))
+
 ########################################################################
 # Run the tests
 
@@ -5858,6 +5882,7 @@ test_list = [ None,
               three_nested_moves,
               copy_to_unversioned_parent,
               copy_text_conflict,
+              copy_over_excluded,
              ]
 
 if __name__ == '__main__':


Reply via email to