You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/10/09 19:59:22 UTC

svn commit: r1396140 [2/2] - in /subversion/branches/auto-props-sdc: ./ subversion/bindings/swig/python/libsvn_swig_py/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/ subversion/libsvn_repos/ subversio...

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c Tue Oct  9 17:59:20 2012
@@ -43,9 +43,6 @@
 #include "entries.h"
 #include "lock.h"
 #include "conflicts.h"
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-#include "tree_conflicts.h"
-#endif
 #include "wc_db_private.h"
 #include "workqueue.h"
 
@@ -4897,16 +4894,21 @@ svn_wc__db_op_add_directory(svn_wc__db_t
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
+  const char *dir_abspath;
+  const char *name;
   insert_working_baton_t iwb;
 
+  /* Resolve wcroot via parent directory to avoid obstruction handling */
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  svn_dirent_split(&dir_abspath, &name, local_abspath, scratch_pool);
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
-                              local_abspath, scratch_pool, scratch_pool));
+                              dir_abspath, scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
 
   blank_iwb(&iwb);
 
+  local_relpath = svn_relpath_join(local_relpath, name, scratch_pool);
   iwb.presence = svn_wc__db_status_normal;
   iwb.kind = svn_kind_dir;
   iwb.op_depth = relpath_depth(local_relpath);
@@ -4933,15 +4935,20 @@ svn_wc__db_op_add_file(svn_wc__db_t *db,
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
   insert_working_baton_t iwb;
+  const char *dir_abspath;
+  const char *name;
 
+  /* Resolve wcroot via parent directory to avoid obstruction handling */
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  svn_dirent_split(&dir_abspath, &name, local_abspath, scratch_pool);
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
-                              local_abspath, scratch_pool, scratch_pool));
+                              dir_abspath, scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
 
   blank_iwb(&iwb);
 
+  local_relpath = svn_relpath_join(local_relpath, name, scratch_pool);
   iwb.presence = svn_wc__db_status_normal;
   iwb.kind = svn_kind_file;
   iwb.op_depth = relpath_depth(local_relpath);
@@ -4966,16 +4973,23 @@ svn_wc__db_op_add_symlink(svn_wc__db_t *
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
   insert_working_baton_t iwb;
+  const char *dir_abspath;
+  const char *name;
 
+  /* Resolve wcroot via parent directory to avoid obstruction handling */
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(target != NULL);
 
+  svn_dirent_split(&dir_abspath, &name, local_abspath, scratch_pool);
+
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
-                              local_abspath, scratch_pool, scratch_pool));
+                              dir_abspath, scratch_pool, scratch_pool));
+
   VERIFY_USABLE_WCROOT(wcroot);
 
   blank_iwb(&iwb);
 
+  local_relpath = svn_relpath_join(local_relpath, name, scratch_pool);
   iwb.presence = svn_wc__db_status_normal;
   iwb.kind = svn_kind_symlink;
   iwb.op_depth = relpath_depth(local_relpath);
@@ -5570,11 +5584,6 @@ mark_conflict(svn_wc__db_wcroot_t *wcroo
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t got_row;
   svn_boolean_t is_complete;
-#if defined(SVN_DEBUG) && (SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS)
-  svn_boolean_t had_text_conflict;
-  svn_boolean_t had_prop_conflict;
-  svn_boolean_t had_tree_conflict;
-#endif
 
   SVN_ERR(svn_wc__conflict_skel_is_complete(&is_complete, conflict_skel));
   SVN_ERR_ASSERT(is_complete);
@@ -5583,23 +5592,6 @@ mark_conflict(svn_wc__db_wcroot_t *wcroo
                                     STMT_SELECT_ACTUAL_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&got_row, stmt));
-
-#if defined(SVN_DEBUG) && (SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS)
-  if (got_row)
-    {
-      had_text_conflict = (!svn_sqlite__column_is_null(stmt, 3)
-                           || !svn_sqlite__column_is_null(stmt, 4)
-                           || !svn_sqlite__column_is_null(stmt, 5));
-      had_prop_conflict = !svn_sqlite__column_is_null(stmt, 6);
-      had_tree_conflict = !svn_sqlite__column_is_null(stmt, 7);
-    }
-  else
-    {
-      had_text_conflict = FALSE;
-      had_prop_conflict = FALSE;
-      had_tree_conflict = FALSE;
-    }
-#endif
   SVN_ERR(svn_sqlite__reset(stmt));
 
   if (got_row)
@@ -5614,212 +5606,17 @@ mark_conflict(svn_wc__db_wcroot_t *wcroo
                                         STMT_INSERT_ACTUAL_CONFLICT));
       SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
       if (*local_relpath != '\0')
-        SVN_ERR(svn_sqlite__bind_text(stmt, 9,
+        SVN_ERR(svn_sqlite__bind_text(stmt, 4,
                                       svn_relpath_dirname(local_relpath,
                                                           scratch_pool)));
     }
 
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-    {
-      /* Store conflict data in the old locations */
-      svn_boolean_t text_conflict;
-      svn_boolean_t prop_conflict;
-      svn_boolean_t tree_conflict;
-      const apr_array_header_t *locations;
-      svn_wc_operation_t operation;
-
-      svn_wc__db_t *db;
-      const char *local_abspath;
-
-      /* Ugly but temporary hack: obtain a DB for transforming paths.
-         ### Can't use this for a write tranaction or we get a deadlock! */
-
-      SVN_ERR(svn_wc__db_open(&db, NULL, FALSE, FALSE,
-                              scratch_pool, scratch_pool));
-
-      local_abspath = svn_dirent_join(wcroot->abspath, local_relpath,
-                                      scratch_pool);
-
-      SVN_ERR(svn_wc__conflict_read_info(&operation, &locations,
-                                         &text_conflict, &prop_conflict,
-                                         &tree_conflict,
-                                         db, local_abspath, conflict_skel,
-                                         scratch_pool, scratch_pool));
-
-#ifdef SVN_DEBUG
-      /* This function should only ADD conflicts */
-      SVN_ERR_ASSERT(text_conflict || !had_text_conflict);
-      SVN_ERR_ASSERT(prop_conflict || !had_prop_conflict);
-      SVN_ERR_ASSERT(tree_conflict || !had_tree_conflict);
-#endif
-
-      if (text_conflict)
-        {
-          const char *mine_path;
-          const char *their_old_path;
-          const char *their_path;
-
-          SVN_ERR(svn_wc__conflict_read_text_conflict(&mine_path,
-                                                      &their_old_path,
-                                                      &their_path,
-                                                      db, local_abspath,
-                                                      conflict_skel,
-                                                      scratch_pool,
-                                                      scratch_pool));
-
-          if (their_old_path)
-            {
-              their_old_path = svn_dirent_skip_ancestor(wcroot->abspath,
-                                                        their_old_path);
-              SVN_ERR(svn_sqlite__bind_text(stmt, 4, their_old_path));
-            }
-
-          if (their_path)
-            {
-              their_path = svn_dirent_skip_ancestor(wcroot->abspath,
-                                                    their_path);
-              SVN_ERR(svn_sqlite__bind_text(stmt, 5, their_path));
-            }
-
-          if (mine_path)
-            {
-              mine_path = svn_dirent_skip_ancestor(wcroot->abspath, mine_path);
-              SVN_ERR(svn_sqlite__bind_text(stmt, 6, mine_path));
-            }
-        }
-
-      if (prop_conflict)
-        {
-          const char *prej_path;
-
-          SVN_ERR(svn_wc__conflict_read_prop_conflict(&prej_path, NULL,
-                                                      NULL, NULL, NULL,
-                                                      db, local_abspath,
-                                                      conflict_skel,
-                                                      scratch_pool, scratch_pool));
-
-          if (prej_path)
-            {
-              prej_path = svn_dirent_skip_ancestor(wcroot->abspath, prej_path);
-              SVN_ERR(svn_sqlite__bind_text(stmt, 7, prej_path));
-            }
-        }
-
-      if (tree_conflict)
-        {
-          svn_wc_conflict_description2_t *desc;
-          svn_wc_conflict_version_t *v1;
-          svn_wc_conflict_version_t *v2;
-          svn_node_kind_t tc_kind;
-          svn_skel_t *skel;
-          svn_wc_conflict_reason_t local_change;
-          svn_wc_conflict_action_t incoming_change;
-
-          SVN_ERR(svn_wc__conflict_read_tree_conflict(&local_change,
-                                                      &incoming_change,
-                                                      db, local_abspath,
-                                                      conflict_skel,
-                                                      scratch_pool, scratch_pool));
-
-
-          v1 = (locations && locations->nelts > 0)
-                    ? APR_ARRAY_IDX(locations, 0, svn_wc_conflict_version_t *)
-                    : NULL;
-
-          v2 = (locations && locations->nelts > 1)
-                    ? APR_ARRAY_IDX(locations, 1, svn_wc_conflict_version_t *)
-                    : NULL;
-
-          if (incoming_change != svn_wc_conflict_action_delete
-              && (operation == svn_wc_operation_update
-                  || operation == svn_wc_operation_switch))
-            {
-              svn_wc__db_status_t status;
-              svn_revnum_t revision;
-              const char *repos_relpath;
-              apr_int64_t repos_id;
-              svn_kind_t kind;
-              svn_error_t *err;
-
-              /* ### Theoretically we should just fetch the BASE information
-                     here. This code might need tweaks until all tree conflicts
-                     are installed in the proper state */
-
-              SVN_ERR_ASSERT(v2 == NULL); /* Not set for update and switch */
-
-              /* With an update or switch we have to fetch the second location
-                 for a tree conflict from WORKING. (For text or prop from BASE)
-               */
-              err = base_get_info(&status, &kind, &revision,
-                                  &repos_relpath, &repos_id, NULL, NULL, NULL,
-                                  NULL, NULL, NULL, NULL, NULL, NULL,
-                                  wcroot, local_relpath,
-                                  scratch_pool, scratch_pool);
-
-              if (err)
-                {
-                  if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-                    return svn_error_trace(err);
-
-                  svn_error_clear(err);
-                  /* Ignore BASE */
-
-                  tc_kind = svn_node_file; /* Avoid assertion */
-                }
-              else if (repos_relpath)
-                {
-                  const char *repos_root_url;
-                  const char *repos_uuid;
-
-                  SVN_ERR(fetch_repos_info(&repos_root_url, &repos_uuid,
-                                           wcroot->sdb, repos_id,
-                                           scratch_pool));
-
-                  v2 = svn_wc_conflict_version_create2(repos_root_url,
-                                                       repos_uuid,
-                                                       repos_relpath,
-                                                       revision,
-                                                svn__node_kind_from_kind(kind),
-                                                       scratch_pool);
-                  tc_kind = svn__node_kind_from_kind(kind);
-                }
-              else
-                tc_kind = svn_node_file; /* Avoid assertion */
-            }
-          else
-            {
-              if (v1)
-                tc_kind = v1->node_kind;
-              else if (v2)
-                tc_kind = v2->node_kind;
-              else
-                tc_kind = svn_node_file; /* Avoid assertion */
-            }
-
-          desc = svn_wc_conflict_description_create_tree2(local_abspath,
-                                                          tc_kind,
-                                                          operation,
-                                                          v1, v2,
-                                                          scratch_pool);
-          desc->reason = local_change;
-          desc->action = incoming_change;
-
-          SVN_ERR(svn_wc__serialize_conflict(&skel, desc,
-                                             scratch_pool, scratch_pool));
-
-          SVN_ERR(svn_sqlite__bind_text(stmt, 8,
-                        svn_skel__unparse(skel, scratch_pool)->data));
-        }
-      SVN_ERR(svn_wc__db_close(db));
-    }
-#else
-  /* And in the new location */
   {
     svn_stringbuf_t *sb = svn_skel__unparse(conflict_skel, scratch_pool);
 
     SVN_ERR(svn_sqlite__bind_blob(stmt, 3, sb->data, sb->len));
   }
-#endif
+
   SVN_ERR(svn_sqlite__update(NULL, stmt));
 
   return SVN_NO_ERROR;
@@ -5860,9 +5657,7 @@ struct op_mark_resolved_baton
   svn_boolean_t resolved_props;
   svn_boolean_t resolved_tree;
   const svn_skel_t *work_items;
-#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
   svn_wc__db_t *db;
-#endif
 };
 
 /* Helper for svn_wc__db_op_mark_resolved */
@@ -5876,14 +5671,10 @@ db_op_mark_resolved(void *baton,
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
   int total_affected_rows = 0;
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-  int affected_rows;
-#else
   svn_boolean_t resolved_all;
   apr_size_t conflict_len;
   const void *conflict_data;
   svn_skel_t *conflicts;
-#endif
 
   /* Check if we have a conflict in ACTUAL */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
@@ -5914,33 +5705,6 @@ db_op_mark_resolved(void *baton,
                                                           scratch_pool));
     }
 
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-  SVN_ERR(svn_sqlite__reset(stmt));
-  if (rb->resolved_text)
-    {
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                        STMT_CLEAR_TEXT_CONFLICT));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
-      total_affected_rows += affected_rows;
-    }
-  if (rb->resolved_props)
-    {
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                        STMT_CLEAR_PROPS_CONFLICT));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
-      total_affected_rows += affected_rows;
-    }
-  if (rb->resolved_tree)
-    {
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                        STMT_CLEAR_TREE_CONFLICT));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-      SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
-      total_affected_rows += affected_rows;
-    }
-#else
   conflict_data = svn_sqlite__column_blob(stmt, 2, &conflict_len,
                                           scratch_pool);
   conflicts = svn_skel__parse(conflict_data, conflict_len, scratch_pool);
@@ -5965,7 +5729,6 @@ db_op_mark_resolved(void *baton,
     }
 
   SVN_ERR(svn_sqlite__update(&total_affected_rows, stmt));
-#endif
 
   /* Now, remove the actual node if it doesn't have any more useful
      information.  We only need to do this if we've remove data ourselves. */
@@ -6005,9 +5768,7 @@ svn_wc__db_op_mark_resolved(svn_wc__db_t
   rb.resolved_text = resolved_text;
   rb.resolved_tree = resolved_tree;
   rb.work_items = work_items;
-#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
   rb.db = db;
-#endif
 
   SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, db_op_mark_resolved,
                               &rb, scratch_pool));
@@ -6332,9 +6093,7 @@ struct revert_list_read_baton {
   svn_boolean_t *copied_here;
   svn_kind_t *kind;
   apr_pool_t *result_pool;
-#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
   svn_wc__db_t *db;
-#endif
 };
 
 static svn_error_t *
@@ -6363,24 +6122,6 @@ revert_list_read(void *baton,
 
       if (is_actual)
         {
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-          int i;
-
-          for (i = 6; i <= 9; i++)
-            {
-              const char *relpath = svn_sqlite__column_text(stmt, i, NULL);
-
-              if (! relpath)
-                continue;
-
-              if (!b->marker_paths)
-                b->marker_paths = apr_array_make(b->result_pool, 4,
-                                                 sizeof(const char*));
-
-              APR_ARRAY_PUSH(b->marker_paths, const char *)
-                  = svn_dirent_join(wcroot->abspath, relpath, b->result_pool);
-            }
-#else
           apr_size_t conflict_len;
           const void *conflict_data;
 
@@ -6401,7 +6142,6 @@ revert_list_read(void *baton,
               /* De-const-ify. */
               b->marker_paths = (apr_array_header_t *)marker_paths;
             }
-#endif
 
           if (!svn_sqlite__column_is_null(stmt, 1)) /* notify */
             *(b->reverted) = TRUE;
@@ -6452,9 +6192,7 @@ svn_wc__db_revert_list_read(svn_boolean_
   b.copied_here = copied_here;
   b.kind = kind;
   b.result_pool = result_pool;
-#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
   b.db = db;
-#endif
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
                               db, local_abspath, scratch_pool, scratch_pool));
@@ -7951,15 +7689,7 @@ read_info(svn_wc__db_status_t *status,
           if (have_act)
             {
               *conflicted =
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-                 !svn_sqlite__column_is_null(stmt_act, 3) || /* old */
-                 !svn_sqlite__column_is_null(stmt_act, 4) || /* new */
-                 !svn_sqlite__column_is_null(stmt_act, 5) || /* working */
-                 !svn_sqlite__column_is_null(stmt_act, 6) || /* prop_reject */
-                 !svn_sqlite__column_is_null(stmt_act, 7); /*tree_conflict_data*/
-#else
                  !svn_sqlite__column_is_null(stmt_act, 2); /* conflict_data */
-#endif
             }
           else
             *conflicted = FALSE;
@@ -8014,11 +7744,7 @@ read_info(svn_wc__db_status_t *status,
     {
       /* A row in ACTUAL_NODE should never exist without a corresponding
          node in BASE_NODE and/or WORKING_NODE unless it flags a tree conflict. */
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-      if (svn_sqlite__column_is_null(stmt_act, 7)) /* tree_conflict_data */
-#else
       if (svn_sqlite__column_is_null(stmt_act, 2)) /* conflict_data */
-#endif
           err = svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
                                   _("Corrupt data for '%s'"),
                                   path_for_error_message(wcroot, local_relpath,
@@ -8465,15 +8191,7 @@ read_children_info(void *baton,
         }
 #endif
 
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-      child->conflicted = !svn_sqlite__column_is_null(stmt, 4) ||  /* old */
-                          !svn_sqlite__column_is_null(stmt, 5) ||  /* new */
-                          !svn_sqlite__column_is_null(stmt, 6) ||  /* work */
-                          !svn_sqlite__column_is_null(stmt, 7) ||  /* prop */
-                          !svn_sqlite__column_is_null(stmt, 8);  /* tree */
-#else
       child->conflicted = !svn_sqlite__column_is_null(stmt, 3); /* conflict */
-#endif
 
       if (child->conflicted)
         apr_hash_set(conflicts, apr_pstrdup(result_pool, name),
@@ -12438,9 +12156,7 @@ struct marker_files_baton
 {
   apr_pool_t *result_pool;
   apr_hash_t *marker_files;
-#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
   svn_wc__db_t *db;
-#endif
 };
 
 /* Locked implementation for svn_wc__db_get_conflict_marker_files */
@@ -12454,66 +12170,6 @@ get_conflict_marker_files(void *baton, s
   apr_hash_t *marker_files = mfb->marker_files;
   apr_pool_t *result_pool = mfb->result_pool;
 
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-  /* Look for property conflicts on the directory in ACTUAL.
-     (A directory can't have text conflicts) */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_CONFLICT_MARKER_FILES1));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-  if (have_row)
-    {
-      const char *marker_relpath;
-
-      marker_relpath = svn_sqlite__column_text(stmt, 0, NULL);
-
-      if (marker_relpath)
-        {
-          const char *marker_abspath;
-
-          marker_abspath = svn_dirent_join(wcroot->abspath, marker_relpath,
-                                           result_pool);
-
-          apr_hash_set(marker_files, marker_abspath, APR_HASH_KEY_STRING,
-                       "");
-        }
-    }
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  /* Look for property and text conflicts on the direct children of
-     LOCAL_RELPATH, as both directories and files can have conflict
-     files in their parent directory */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_CONFLICT_MARKER_FILES2));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-  while (have_row)
-    {
-      int i;
-
-      for (i = 0; i < 4; i++)
-        {
-          const char *marker_relpath;
-
-          marker_relpath = svn_sqlite__column_text(stmt, i, NULL);
-
-          if (marker_relpath)
-            {
-              const char *marker_abspath;
-
-              marker_abspath = svn_dirent_join(wcroot->abspath, marker_relpath,
-                                               result_pool);
-
-              apr_hash_set(marker_files, marker_abspath, APR_HASH_KEY_STRING,
-                           "");
-            }
-        }
-
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-    }
-#else
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_ACTUAL_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
@@ -12575,7 +12231,6 @@ get_conflict_marker_files(void *baton, s
 
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
     }
-#endif
 
   return svn_error_trace(svn_sqlite__reset(stmt));
 }
@@ -12598,9 +12253,7 @@ svn_wc__db_get_conflict_marker_files(apr
 
   mfb.result_pool = result_pool;
   mfb.marker_files = apr_hash_make(result_pool);
-#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
   mfb.db = db;
-#endif
 
   SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, get_conflict_marker_files,
                               &mfb, scratch_pool));
@@ -12676,38 +12329,6 @@ svn_wc__db_read_conflict(svn_skel_t **co
                                                           scratch_pool));
     }
 
-#if SVN_WC__VERSION < SVN_WC__USES_CONFLICT_SKELS
-  {
-    const char *conflict_old = svn_sqlite__column_text(stmt, 3, NULL);
-    const char *conflict_new = svn_sqlite__column_text(stmt, 4, NULL);
-    const char *conflict_wrk = svn_sqlite__column_text(stmt, 5, NULL);
-    const char *conflict_prj = svn_sqlite__column_text(stmt, 6, NULL);
-    apr_size_t tree_conflict_len;
-    const char *tree_conflict_data;
-    svn_skel_t *conflict_skel = NULL;
-    svn_error_t *err;
-
-    tree_conflict_data = svn_sqlite__column_blob(stmt, 7, &tree_conflict_len,
-                                                 NULL);
-
-    err = svn_wc__upgrade_conflict_skel_from_raw(&conflict_skel,
-                                                 db, local_abspath,
-                                                 local_relpath,
-                                                 conflict_old,
-                                                 conflict_wrk,
-                                                 conflict_new,
-                                                 conflict_prj,
-                                                 tree_conflict_data,
-                                                 tree_conflict_len,
-                                                 result_pool,
-                                                 scratch_pool);
-
-    *conflict = conflict_skel;
-    
-    return svn_error_trace(
-                svn_error_compose_create(err, svn_sqlite__reset(stmt)));
-  }
-#else
   {
     apr_size_t cfl_len;
     const void *cfl_data;
@@ -12722,7 +12343,6 @@ svn_wc__db_read_conflict(svn_skel_t **co
 
     return svn_error_trace(svn_sqlite__reset(stmt));
   }
-#endif
 }
 
 

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c Tue Oct  9 17:59:20 2012
@@ -26,6 +26,7 @@
 #include <assert.h>
 
 #include "svn_dirent_uri.h"
+#include "svn_path.h"
 
 #include "wc.h"
 #include "adm_files.h"
@@ -353,6 +354,40 @@ compute_relpath(const svn_wc__db_wcroot_
 }
 
 
+/* Return in *LINK_TARGET_ABSPATH the absolute path the symlink at
+ * LOCAL_ABSPATH is pointing to. Perform all allocations in POOL. */
+static svn_error_t *
+read_link_target(const char **link_target_abspath,
+                 const char *local_abspath,
+                 apr_pool_t *pool)
+{
+  svn_string_t *link_target;
+  const char *canon_link_target;
+
+  SVN_ERR(svn_io_read_link(&link_target, local_abspath, pool));
+  if (link_target->len == 0)
+    return svn_error_createf(SVN_ERR_WC_NOT_SYMLINK, NULL,
+                             _("The symlink at '%s' points nowhere"),
+                             svn_dirent_local_style(local_abspath, pool));
+
+  canon_link_target = svn_dirent_canonicalize(link_target->data, pool);
+                
+  /* Treat relative symlinks as relative to LOCAL_ABSPATH's parent. */
+  if (!svn_dirent_is_absolute(canon_link_target))
+    canon_link_target = svn_dirent_join(svn_dirent_dirname(local_abspath,
+                                                           pool),
+                                        canon_link_target, pool);
+
+  /* Collapse any .. in the symlink part of the path. */
+  if (svn_path_is_backpath_present(canon_link_target))
+    SVN_ERR(svn_dirent_get_absolute(link_target_abspath, canon_link_target,
+                                    pool));
+  else
+    *link_target_abspath = canon_link_target;
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot,
                                       const char **local_relpath,
@@ -543,6 +578,8 @@ svn_wc__db_wcroot_parse_local_abspath(sv
                   if (found_wcroot)
                     break;
 
+                  SVN_ERR(read_link_target(&local_abspath, local_abspath,
+                                           scratch_pool));
 try_symlink_as_dir:
                   kind = svn_kind_dir;
                   moved_upwards = FALSE;
@@ -692,7 +729,8 @@ try_symlink_as_dir:
                                              scratch_pool));
           if (resolved_kind == svn_node_dir)
             {
-              local_abspath = original_abspath;
+              SVN_ERR(read_link_target(&local_abspath, original_abspath,
+                                       scratch_pool));
               goto try_symlink_as_dir;
             }
         }

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c Tue Oct  9 17:59:20 2012
@@ -1,5 +1,7 @@
 /*
- * deadprops.c: mod_dav_svn dead property provider functions for Subversion
+ * deadprops.c: mod_dav_svn provider functions for "dead properties"
+ *              (properties implemented by Subversion or its users,
+ *              not as part of the WebDAV specification).
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/liveprops.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/liveprops.c Tue Oct  9 17:59:20 2012
@@ -1,5 +1,7 @@
 /*
- * liveprops.c: mod_dav_svn live property provider functions for Subversion
+ * liveprops.c: mod_dav_svn provider functions for "live properties"
+ *              (properties implemented by the WebDAV specification
+ *              itself, not unique to Subversion or its users).
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/auto-props-sdc/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/propget-cmd.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/propget-cmd.c Tue Oct  9 17:59:20 2012
@@ -251,8 +251,6 @@ print_properties(svn_stream_t *out,
 
   if (inherited_props)
     {
-      int i;
-
       svn_pool_clear(iterpool);
 
       for (i = 0; i < inherited_props->nelts; i++)

Modified: subversion/branches/auto-props-sdc/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/special_tests.py?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/auto-props-sdc/subversion/tests/cmdline/special_tests.py Tue Oct  9 17:59:20 2012
@@ -759,7 +759,6 @@ def symlink_destination_change(sbox):
 # (disk and metadata).
 @Issue(3884)
 @SkipUnless(svntest.main.is_posix_os)
-@XFail()
 def merge_foreign_symlink(sbox):
   "merge symlink-add from foreign repos"
 
@@ -790,7 +789,7 @@ def merge_foreign_symlink(sbox):
   # Verify special status.
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.add({
-    'A/zeta': Item(props={ 'svn:special': '*' })
+    'A/zeta': Item(contents="link target", props={ 'svn:special': '*' })
   })
   svntest.actions.verify_disk(sbox.ospath(''), expected_disk, True)
 
@@ -820,7 +819,7 @@ def symlink_to_wc_basic(sbox):
   wc_uuid = svntest.actions.get_wc_uuid(wc_dir)
   expected_info = [{
       'Path' : re.escape(os.path.join(symlink_path)),
-      'Working Copy Root Path' : re.escape(os.path.abspath(symlink_path)),
+      'Working Copy Root Path' : re.escape(os.path.abspath(wc_dir)),
       'Repository Root' : sbox.repo_url,
       'Repository UUID' : wc_uuid,
       'Revision' : '1',
@@ -829,7 +828,7 @@ def symlink_to_wc_basic(sbox):
   }, {
       'Name' : 'iota',
       'Path' : re.escape(os.path.join(symlink_path, 'iota')),
-      'Working Copy Root Path' : re.escape(os.path.abspath(symlink_path)),
+      'Working Copy Root Path' : re.escape(os.path.abspath(wc_dir)),
       'Repository Root' : sbox.repo_url,
       'Repository UUID' : wc_uuid,
       'Revision' : '1',

Modified: subversion/branches/auto-props-sdc/tools/client-side/svn-bench/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/tools/client-side/svn-bench/notify.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/tools/client-side/svn-bench/notify.c (original)
+++ subversion/branches/auto-props-sdc/tools/client-side/svn-bench/notify.c Tue Oct  9 17:59:20 2012
@@ -65,43 +65,6 @@ struct notify_baton
 };
 
 
-svn_error_t *
-svn_cl__print_conflict_stats(void *notify_baton, apr_pool_t *pool)
-{
-  struct notify_baton *nb = notify_baton;
-  unsigned int text_conflicts;
-  unsigned int prop_conflicts;
-  unsigned int tree_conflicts;
-  unsigned int skipped_paths;
-
-  text_conflicts = nb->text_conflicts;
-  prop_conflicts = nb->prop_conflicts;
-  tree_conflicts = nb->tree_conflicts;
-  skipped_paths = nb->skipped_paths;
-
-  if (text_conflicts > 0 || prop_conflicts > 0
-    || tree_conflicts > 0 || skipped_paths > 0)
-      SVN_ERR(svn_cmdline_printf(pool, "%s", _("Summary of conflicts:\n")));
-
-  if (text_conflicts > 0)
-    SVN_ERR(svn_cmdline_printf
-      (pool, _("  Text conflicts: %u\n"), text_conflicts));
-
-  if (prop_conflicts > 0)
-    SVN_ERR(svn_cmdline_printf
-      (pool, _("  Property conflicts: %u\n"), prop_conflicts));
-
-  if (tree_conflicts > 0)
-    SVN_ERR(svn_cmdline_printf
-      (pool, _("  Tree conflicts: %u\n"), tree_conflicts));
-
-  if (skipped_paths > 0)
-    SVN_ERR(svn_cmdline_printf
-      (pool, _("  Skipped paths: %u\n"), skipped_paths));
-
-  return SVN_NO_ERROR;
-}
-
 /* Add a conflicted path to the list of conflicted paths stored
  * in the notify baton. */
 static void

Modified: subversion/branches/auto-props-sdc/tools/client-side/svn-bench/null-export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/tools/client-side/svn-bench/null-export-cmd.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/tools/client-side/svn-bench/null-export-cmd.c (original)
+++ subversion/branches/auto-props-sdc/tools/client-side/svn-bench/null-export-cmd.c Tue Oct  9 17:59:20 2012
@@ -294,7 +294,7 @@ svn_cl__null_export(apr_getopt_t *os,
 {
   svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
-  const char *from, *to;
+  const char *from;
   apr_array_header_t *targets;
   svn_error_t *err;
   svn_opt_revision_t peg_revision;
@@ -317,21 +317,6 @@ svn_cl__null_export(apr_getopt_t *os,
   /* Get the peg revision if present. */
   SVN_ERR(svn_opt_parse_path(&peg_revision, &truefrom, from, pool));
 
-  /* If only one target was given, split off the basename to use as
-     the `to' path.  Else, a `to' path was supplied. */
-  if (targets->nelts == 1)
-    {
-      to = svn_path_uri_decode(svn_uri_basename(truefrom, pool), pool);
-    }
-  else
-    {
-      to = APR_ARRAY_IDX(targets, 1, const char *);
-
-      /* If given the cwd, pretend we weren't given anything. */
-      if (strcmp("", to) == 0)
-        to = svn_path_uri_decode(svn_uri_basename(truefrom, pool), pool);
-    }
-
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_infinity;
 

Modified: subversion/branches/auto-props-sdc/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/tools/dist/release.py?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/tools/dist/release.py (original)
+++ subversion/branches/auto-props-sdc/tools/dist/release.py Tue Oct  9 17:59:20 2012
@@ -679,7 +679,7 @@ def write_downloads(args):
 #----------------------------------------------------------------------
 # Validate the signatures for a release
 
-key_start = '-----BEGIN PGP SIGNATURE-----\n'
+key_start = '-----BEGIN PGP SIGNATURE-----'
 fp_pattern = re.compile(r'^pub\s+(\w+\/\w+)[^\n]*\n\s+Key\sfingerprint\s=((\s+[0-9A-F]{4}){10})\nuid\s+([^<\(]+)\s')
 
 def check_sigs(args):

Modified: subversion/branches/auto-props-sdc/tools/server-side/svnauthz-validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/tools/server-side/svnauthz-validate.c?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/tools/server-side/svnauthz-validate.c (original)
+++ subversion/branches/auto-props-sdc/tools/server-side/svnauthz-validate.c Tue Oct  9 17:59:20 2012
@@ -44,7 +44,7 @@ enum {
 static int
 usage(const char *argv0)
 {
-  printf("Usage:  %s FILE [--username USER [--path FSPATH] [--repository REPOS_NAME]]\n\n", argv0);
+  printf("Usage:  %s FILE [--username USER [--path FSPATH] [--repository REPOS_NAME]] FILE\n\n", argv0);
   printf("Loads the authz file at FILE and validates its syntax.\n"
          "Optionally prints the access available to USER for FSPATH in\n"
          "repository with authz name REPOS_NAME.  If FSPATH is omitted, reports\n"

Modified: subversion/branches/auto-props-sdc/tools/server-side/svnpubsub/irkerbridge.py
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/tools/server-side/svnpubsub/irkerbridge.py?rev=1396140&r1=1396139&r2=1396140&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/tools/server-side/svnpubsub/irkerbridge.py (original)
+++ subversion/branches/auto-props-sdc/tools/server-side/svnpubsub/irkerbridge.py Tue Oct  9 17:59:20 2012
@@ -166,6 +166,27 @@ class BigDoEverythingClass(object):
       else:
         rev.subdirs_count_s = ""
 
+  def _send(self, irker, msg):
+    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+    irker_list = irker.split(':')
+    if len(irker_list) < 2:
+      irker_list.append(6659)
+    json_msg = json.dumps(msg)
+    sock.sendto(json_msg, (irker_list[0],int(irker_list[1])))
+    if self.options.verbose:
+      print "SENT: %s to %s" % (json_msg, irker)
+
+  def join_all(self):
+    # Like self.commit(), but ignores self.config.get(section, "template").
+    for section in self.config.sections():
+      irker = self.config.get(section, "irker")
+      to_list = self.config.get(section, "to").split()
+      if not irker or not to_list:
+        continue
+      for to in to_list:
+        msg = {'to': to, 'privmsg': ''}
+        self._send(irker, msg)
+
   def commit(self, host, port, rev):
     if self.options.verbose:
       print "RECV: from %s:%s" % (host, port)
@@ -180,20 +201,13 @@ class BigDoEverythingClass(object):
           to_list = self.config.get(section, "to").split()
           template = self.config.get(section, "template")
           if not irker or not to_list or not template:
-            next
+            continue
           privmsg = Template(template).safe_substitute(vars(rev))
           if len(privmsg) > MAX_PRIVMSG:
             privmsg = privmsg[:MAX_PRIVMSG-3] + '...'
           for to in to_list:
             msg = {'to': to, 'privmsg': privmsg}
-            sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-            irker_list = irker.split(':')
-            if len(irker_list) < 2:
-              irker_list.append(6659)
-            json_msg = json.dumps(msg)
-            sock.sendto(json_msg, (irker_list[0],int(irker_list[1])))
-            if self.options.verbose:
-              print "SENT: %s to %s" % (json_msg, irker)
+            self._send(irker, msg)
 
     except:
       print "Unexpected error:"