You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/08/19 13:21:06 UTC

svn commit: r1515362 [8/13] - in /subversion/branches/move-tracking-1: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ notes/tree-conflicts/ subversion/bindings/cxxhl/include/ subversion/bindings/cxxhl/include/svncxxhl/ subversio...

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/util.c?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/util.c Mon Aug 19 11:21:01 2013
@@ -188,11 +188,11 @@ svn_wc_match_ignore_list(const char *str
   return svn_cstring_match_glob_list(str, list);
 }
 
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_text2(const char *local_abspath,
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_text3(const char *local_abspath,
                                          apr_pool_t *result_pool)
 {
-  svn_wc_conflict_description2_t *conflict;
+  svn_wc_conflict_description3_t *conflict;
 
   SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
 
@@ -205,13 +205,13 @@ svn_wc_conflict_description_create_text2
   return conflict;
 }
 
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_prop2(const char *local_abspath,
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_prop3(const char *local_abspath,
                                          svn_node_kind_t node_kind,
                                          const char *property_name,
                                          apr_pool_t *result_pool)
 {
-  svn_wc_conflict_description2_t *conflict;
+  svn_wc_conflict_description3_t *conflict;
 
   SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
 
@@ -223,8 +223,8 @@ svn_wc_conflict_description_create_prop2
   return conflict;
 }
 
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_tree2(
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_tree3(
   const char *local_abspath,
   svn_node_kind_t node_kind,
   svn_wc_operation_t operation,
@@ -232,7 +232,7 @@ svn_wc_conflict_description_create_tree2
   const svn_wc_conflict_version_t *src_right_version,
   apr_pool_t *result_pool)
 {
-  svn_wc_conflict_description2_t *conflict;
+  svn_wc_conflict_description3_t *conflict;
 
   SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
 
@@ -249,11 +249,11 @@ svn_wc_conflict_description_create_tree2
 }
 
 
-svn_wc_conflict_description2_t *
-svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
+svn_wc_conflict_description3_t *
+svn_wc__conflict_description3_dup(const svn_wc_conflict_description3_t *conflict,
                                   apr_pool_t *pool)
 {
-  svn_wc_conflict_description2_t *new_conflict;
+  svn_wc_conflict_description3_t *new_conflict;
 
   new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
 
@@ -339,6 +339,90 @@ svn_wc_conflict_version_dup(const svn_wc
   return new_version;
 }
 
+apr_array_header_t *
+svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts,
+                               apr_pool_t *result_pool)
+{
+  apr_array_header_t *new_conflicts;
+  int i;
+
+  new_conflicts = apr_array_make(result_pool, conflicts->nelts,
+                                 sizeof (svn_wc_conflict_description2_t *));
+
+  for (i = 0; i < conflicts->nelts; i++)
+    {
+      svn_wc_conflict_description3_t *cd;
+      svn_wc_conflict_description2_t *cd2;
+      
+      cd = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
+      cd2 = svn_wc__cd3_to_cd2(cd, result_pool);
+      APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *) = cd2;
+    }
+
+  return new_conflicts;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict,
+                   apr_pool_t *result_pool)
+{
+  svn_wc_conflict_description2_t *new_conflict;
+
+  if (conflict == NULL)
+    return NULL;
+
+  new_conflict = apr_pcalloc(result_pool, sizeof(*new_conflict));
+
+  if (conflict->local_abspath)
+    new_conflict->local_abspath = apr_pstrdup(result_pool,
+                                              conflict->local_abspath);
+  new_conflict->node_kind = conflict->node_kind;
+  new_conflict->kind = conflict->kind;
+  if (conflict->property_name)
+    new_conflict->property_name = apr_pstrdup(result_pool,
+                                              conflict->property_name);
+  new_conflict->is_binary = conflict->is_binary;
+  if (conflict->mime_type)
+    new_conflict->mime_type = apr_pstrdup(result_pool, conflict->mime_type);
+  new_conflict->action = conflict->action;
+  new_conflict->reason = conflict->reason;
+  if (conflict->base_abspath)
+    new_conflict->base_abspath = apr_pstrdup(result_pool,
+                                             conflict->base_abspath);
+
+  if (conflict->kind == svn_wc_conflict_kind_property)
+    {
+      /* For property conflicts, cd2 stored prop_reject_abspath in
+       * their_abspath, and stored theirs_abspath in merged_file. */
+      if (conflict->prop_reject_abspath)
+        new_conflict->their_abspath = apr_pstrdup(result_pool,
+                                                  conflict->prop_reject_abspath);
+      if (conflict->their_abspath)
+        new_conflict->merged_file = apr_pstrdup(result_pool,
+                                                conflict->their_abspath);
+    }
+  else
+    {
+      if (conflict->their_abspath)
+        new_conflict->their_abspath = apr_pstrdup(result_pool,
+                                                  conflict->their_abspath);
+
+      if (conflict->merged_file)
+        new_conflict->merged_file = apr_pstrdup(result_pool,
+                                                conflict->merged_file);
+    }
+  if (conflict->my_abspath)
+    new_conflict->my_abspath = apr_pstrdup(result_pool, conflict->my_abspath);
+  new_conflict->operation = conflict->operation;
+  if (conflict->src_left_version)
+    new_conflict->src_left_version =
+      svn_wc_conflict_version_dup(conflict->src_left_version, result_pool);
+  if (conflict->src_right_version)
+    new_conflict->src_right_version =
+      svn_wc_conflict_version_dup(conflict->src_right_version, result_pool);
+
+  return new_conflict;
+}
 
 svn_wc_conflict_description_t *
 svn_wc__cd2_to_cd(const svn_wc_conflict_description2_t *conflict,
@@ -403,145 +487,6 @@ svn_wc__cd2_to_cd(const svn_wc_conflict_
 
 
 svn_error_t *
-svn_wc__status2_from_3(svn_wc_status2_t **status,
-                       const svn_wc_status3_t *old_status,
-                       svn_wc_context_t *wc_ctx,
-                       const char *local_abspath,
-                       apr_pool_t *result_pool,
-                       apr_pool_t *scratch_pool)
-{
-  const svn_wc_entry_t *entry = NULL;
-
-  if (old_status == NULL)
-    {
-      *status = NULL;
-      return SVN_NO_ERROR;
-    }
-
-  *status = apr_pcalloc(result_pool, sizeof(**status));
-
-  if (old_status->versioned)
-    {
-      svn_error_t *err;
-      err= svn_wc__get_entry(&entry, wc_ctx->db, local_abspath, FALSE,
-                             svn_node_unknown, result_pool, scratch_pool);
-
-      if (err && err->apr_err == SVN_ERR_NODE_UNEXPECTED_KIND)
-        svn_error_clear(err);
-      else
-        SVN_ERR(err);
-    }
-
-  (*status)->entry = entry;
-  (*status)->copied = old_status->copied;
-  (*status)->repos_lock = svn_lock_dup(old_status->repos_lock, result_pool);
-
-  if (old_status->repos_relpath)
-    (*status)->url = svn_path_url_add_component2(old_status->repos_root_url,
-                                                 old_status->repos_relpath,
-                                                 result_pool);
-  (*status)->ood_last_cmt_rev = old_status->ood_changed_rev;
-  (*status)->ood_last_cmt_date = old_status->ood_changed_date;
-  (*status)->ood_kind = old_status->ood_kind;
-  (*status)->ood_last_cmt_author = old_status->ood_changed_author;
-
-  if (old_status->conflicted)
-    {
-      const svn_wc_conflict_description2_t *tree_conflict;
-      SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, wc_ctx, local_abspath,
-                                        scratch_pool, scratch_pool));
-      (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict, result_pool);
-    }
-
-  (*status)->switched = old_status->switched;
-
-  (*status)->text_status = old_status->node_status;
-  (*status)->prop_status = old_status->prop_status;
-
-  (*status)->repos_text_status = old_status->repos_node_status;
-  (*status)->repos_prop_status = old_status->repos_prop_status;
-
-  /* Some values might be inherited from properties */
-  if (old_status->node_status == svn_wc_status_modified
-      || old_status->node_status == svn_wc_status_conflicted)
-    (*status)->text_status = old_status->text_status;
-
-  /* (Currently a no-op, but just make sure it is ok) */
-  if (old_status->repos_node_status == svn_wc_status_modified
-      || old_status->repos_node_status == svn_wc_status_conflicted)
-    (*status)->repos_text_status = old_status->repos_text_status;
-
-  if (old_status->node_status == svn_wc_status_added)
-    (*status)->prop_status = svn_wc_status_none; /* No separate info */
-
-  /* Find pristine_text_status value */
-  switch (old_status->text_status)
-    {
-      case svn_wc_status_none:
-      case svn_wc_status_normal:
-      case svn_wc_status_modified:
-        (*status)->pristine_text_status = old_status->text_status;
-        break;
-      case svn_wc_status_conflicted:
-      default:
-        /* ### Fetch compare data, or fall back to the documented
-               not retrieved behavior? */
-        (*status)->pristine_text_status = svn_wc_status_none;
-        break;
-    }
-
-  /* Find pristine_prop_status value */
-  switch (old_status->prop_status)
-    {
-      case svn_wc_status_none:
-      case svn_wc_status_normal:
-      case svn_wc_status_modified:
-        if (old_status->node_status != svn_wc_status_added
-            && old_status->node_status != svn_wc_status_deleted
-            && old_status->node_status != svn_wc_status_replaced)
-          {
-            (*status)->pristine_prop_status = old_status->prop_status;
-          }
-        else
-          (*status)->pristine_prop_status = svn_wc_status_none;
-        break;
-      case svn_wc_status_conflicted:
-      default:
-        /* ### Fetch compare data, or fall back to the documented
-               not retrieved behavior? */
-        (*status)->pristine_prop_status = svn_wc_status_none;
-        break;
-    }
-
-  if (old_status->versioned
-      && old_status->conflicted
-      && old_status->node_status != svn_wc_status_obstructed
-      && (old_status->kind == svn_node_file
-          || old_status->node_status != svn_wc_status_missing))
-    {
-      svn_boolean_t text_conflict_p, prop_conflict_p;
-
-      /* The entry says there was a conflict, but the user might have
-         marked it as resolved by deleting the artifact files, so check
-         for that. */
-      SVN_ERR(svn_wc__internal_conflicted_p(&text_conflict_p,
-                                            &prop_conflict_p,
-                                            NULL,
-                                            wc_ctx->db, local_abspath,
-                                            scratch_pool));
-
-      if (text_conflict_p)
-        (*status)->text_status = svn_wc_status_conflicted;
-
-      if (prop_conflict_p)
-        (*status)->prop_status = svn_wc_status_conflicted;
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
 svn_wc__fetch_kind_func(svn_node_kind_t *kind,
                         void *baton,
                         const char *path,

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/wc-queries.sql?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/wc-queries.sql Mon Aug 19 11:21:01 2013
@@ -472,6 +472,10 @@ WHERE wc_id = ?1
 DELETE FROM lock
 WHERE repos_id = ?1 AND repos_relpath = ?2
 
+-- STMT_DELETE_LOCK_RECURSIVELY
+DELETE FROM lock
+WHERE repos_id = ?1 AND (repos_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(repos_relpath, ?2))
+
 -- STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE
 UPDATE nodes SET dav_cache = NULL
 WHERE dav_cache IS NOT NULL AND wc_id = ?1 AND op_depth = 0

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/wc.h?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/wc.h Mon Aug 19 11:21:01 2013
@@ -681,7 +681,7 @@ svn_wc__write_check(svn_wc__db_t *db,
                     const char *local_abspath,
                     apr_pool_t *scratch_pool);
 
-/* Read into CONFLICTS svn_wc_conflict_description2_t* structs
+/* Read into CONFLICTS svn_wc_conflict_description3_t* structs
  * for all conflicts that have LOCAL_ABSPATH as victim.
  *
  * Victim must be versioned or be part of a tree conflict.

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.c?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.c Mon Aug 19 11:21:01 2013
@@ -2086,6 +2086,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
                svn_wc__db_t *db, /* For checking conflicts */
                svn_boolean_t keep_as_working,
                svn_boolean_t queue_deletes,
+               svn_boolean_t remove_locks,
                svn_revnum_t not_present_revision,
                svn_skel_t *conflict,
                svn_skel_t *work_items,
@@ -2106,6 +2107,16 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
                                             wcroot, local_relpath,
                                             scratch_pool, scratch_pool));
 
+  if (remove_locks)
+    {
+      svn_sqlite__stmt_t *lock_stmt;
+
+      SVN_ERR(svn_sqlite__get_statement(&lock_stmt, wcroot->sdb,
+                                        STMT_DELETE_LOCK_RECURSIVELY));
+      SVN_ERR(svn_sqlite__bindf(lock_stmt, "is", repos_id, repos_relpath));
+      SVN_ERR(svn_sqlite__step_done(lock_stmt));
+    }
+
   if (status == svn_wc__db_status_normal
       && keep_as_working)
     {
@@ -2333,6 +2344,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
                        const char *local_abspath,
                        svn_boolean_t keep_as_working,
                        svn_boolean_t queue_deletes,
+                       svn_boolean_t remove_locks,
                        svn_revnum_t not_present_revision,
                        svn_skel_t *conflict,
                        svn_skel_t *work_items,
@@ -2349,7 +2361,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
 
   SVN_WC__DB_WITH_TXN(db_base_remove(wcroot, local_relpath,
                                      db, keep_as_working, queue_deletes,
-                                     not_present_revision,
+                                     remove_locks, not_present_revision,
                                      conflict, work_items, scratch_pool),
                       wcroot);
 
@@ -10814,7 +10826,7 @@ commit_node(svn_wc__db_wcroot_t *wcroot,
       svn_sqlite__stmt_t *lock_stmt;
 
       SVN_ERR(svn_sqlite__get_statement(&lock_stmt, wcroot->sdb,
-                                        STMT_DELETE_LOCK));
+                                        STMT_DELETE_LOCK_RECURSIVELY));
       SVN_ERR(svn_sqlite__bindf(lock_stmt, "is", repos_id, repos_relpath));
       SVN_ERR(svn_sqlite__step_done(lock_stmt));
     }
@@ -11058,7 +11070,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
               revision != new_rev)))
     {
       return svn_error_trace(db_base_remove(wcroot, local_relpath,
-                                            db, FALSE, FALSE,
+                                            db, FALSE, FALSE, FALSE,
                                             SVN_INVALID_REVNUM,
                                             NULL, NULL, scratch_pool));
     }
@@ -14978,14 +14990,18 @@ svn_wc__db_verify(svn_wc__db_t *db,
 
 svn_error_t *
 svn_wc__db_bump_format(int *result_format,
-                       const char *wcroot_abspath,
+                       svn_boolean_t *bumped_format,
                        svn_wc__db_t *db,
+                       const char *wcroot_abspath,
                        apr_pool_t *scratch_pool)
 {
   svn_sqlite__db_t *sdb;
   svn_error_t *err;
   int format;
 
+  if (bumped_format)
+    *bumped_format = FALSE;
+
   /* Do not scan upwards for a working copy root here to prevent accidental
    * upgrades of any working copies the WCROOT might be nested in.
    * Just try to open a DB at the specified path instead. */
@@ -15020,7 +15036,10 @@ svn_wc__db_bump_format(int *result_forma
 
   SVN_ERR(svn_sqlite__read_schema_version(&format, sdb, scratch_pool));
   err = svn_wc__upgrade_sdb(result_format, wcroot_abspath,
-                                     sdb, format, scratch_pool);
+                            sdb, format, scratch_pool);
+
+  if (err == SVN_NO_ERROR && bumped_format)
+    *bumped_format = (*result_format > format);
 
   /* Make sure we return a different error than expected for upgrades from
      entries */

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.h?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db.h Mon Aug 19 11:21:01 2013
@@ -702,6 +702,9 @@ svn_wc__db_base_add_not_present_node(svn
    (With KEEP_AS_WORKING TRUE, this is a no-op, as everything is
     automatically shadowed by the created copy)
 
+   If REMOVE_LOCKS is TRUE, all locks of this node and any subnodes
+   are also removed. This is to be done during commit of deleted nodes.
+
    If NOT_PRESENT_REVISION specifies a valid revision a not-present
    node is installed in BASE node with kind NOT_PRESENT_KIND after
    deleting.
@@ -715,6 +718,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
                        const char *local_abspath,
                        svn_boolean_t keep_as_working,
                        svn_boolean_t queue_deletes,
+                       svn_boolean_t remove_locks,
                        svn_revnum_t not_present_revision,
                        svn_skel_t *conflict,
                        svn_skel_t *work_items,
@@ -2909,11 +2913,15 @@ svn_wc__db_upgrade_get_repos_id(apr_int6
  * Upgrading subdirectories of a working copy is not supported.
  * If WCROOT_ABSPATH is not a working copy root SVN_ERR_WC_INVALID_OP_ON_CWD
  * is returned.
+ *
+ * If BUMPED_FORMAT is not NULL, set *BUMPED_FORMAT to TRUE if the format
+ * was bumped or to FALSE if the wc was already at the resulting format.
  */
 svn_error_t *
 svn_wc__db_bump_format(int *result_format,
-                       const char *wcroot_abspath,
+                       svn_boolean_t *bumped_format,
                        svn_wc__db_t *db,
+                       const char *wcroot_abspath,
                        apr_pool_t *scratch_pool);
 
 /* @} */

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_update_move.c?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_update_move.c Mon Aug 19 11:21:01 2013
@@ -1008,9 +1008,9 @@ static svn_error_t *
 tc_editor_alter_file(void *baton,
                      const char *dst_relpath,
                      svn_revnum_t expected_move_dst_revision,
-                     apr_hash_t *new_props,
                      const svn_checksum_t *new_checksum,
                      svn_stream_t *new_contents,
+                     apr_hash_t *new_props,
                      apr_pool_t *scratch_pool)
 {
   struct tc_editor_baton *b = baton;
@@ -1071,8 +1071,8 @@ static svn_error_t *
 tc_editor_alter_symlink(void *baton,
                         const char *relpath,
                         svn_revnum_t revision,
-                        apr_hash_t *props,
                         const char *target,
+                        apr_hash_t *props,
                         apr_pool_t *scratch_pool)
 {
   return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, NULL);
@@ -1593,7 +1593,7 @@ update_moved_away_node(svn_editor_t *tc_
           if (props || src_checksum)
             SVN_ERR(svn_editor_alter_file(tc_editor, dst_relpath,
                                           move_root_dst_revision,
-                                          props, src_checksum, contents));
+                                          src_checksum, contents, props));
         }
       else if (src_kind == svn_node_dir)
         {
@@ -1988,8 +1988,12 @@ svn_wc__db_update_moved_away_conflict_vi
 
   /* Send all queued up notifications. */
   SVN_ERR(svn_wc__db_update_move_list_notify(wcroot,
-                                             old_version->peg_rev,
-                                             new_version->peg_rev,
+                                             (old_version
+                                              ? old_version->peg_rev
+                                              : SVN_INVALID_REVNUM),
+                                             (new_version
+                                              ? new_version->peg_rev
+                                              : SVN_INVALID_REVNUM),
                                              notify_func, notify_baton,
                                              scratch_pool));
   if (notify_func)
@@ -2395,7 +2399,9 @@ svn_wc__db_resolve_delete_raise_moved_aw
     wcroot);
 
   SVN_ERR(svn_wc__db_update_move_list_notify(wcroot,
-                                             old_version->peg_rev,
+                                             (old_version
+                                              ? old_version->peg_rev
+                                              : SVN_INVALID_REVNUM),
                                              (new_version
                                               ? new_version->peg_rev
                                               : SVN_INVALID_REVNUM),

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_wcroot.c?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/wc_db_wcroot.c Mon Aug 19 11:21:01 2013
@@ -434,6 +434,8 @@ svn_wc__db_wcroot_parse_local_abspath(sv
   svn_boolean_t always_check = FALSE;
   int wc_format = 0;
   const char *adm_relpath;
+  /* Non-NULL if WCROOT is found through a symlink: */
+  const char *symlink_wcroot_abspath = NULL;
 
   /* ### we need more logic for finding the database (if it is located
      ### outside of the wcroot) and then managing all of that within DB.
@@ -611,6 +613,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
                   if (found_wcroot)
                     break;
 
+                  symlink_wcroot_abspath = local_abspath;
                   SVN_ERR(read_link_target(&local_abspath, local_abspath,
                                            scratch_pool));
 try_symlink_as_dir:
@@ -632,6 +635,7 @@ try_symlink_as_dir:
       local_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
 
       moved_upwards = TRUE;
+      symlink_wcroot_abspath = NULL;
 
       /* Is the parent directory recorded in our hash?  */
       found_wcroot = svn_hash_gets(db->dir_data, local_abspath);
@@ -669,7 +673,10 @@ try_symlink_as_dir:
          (ie. where we found it).  */
 
       err = svn_wc__db_pdh_create_wcroot(wcroot,
-                            apr_pstrdup(db->state_pool, local_abspath),
+                            apr_pstrdup(db->state_pool,
+                                        symlink_wcroot_abspath
+                                          ? symlink_wcroot_abspath
+                                          : local_abspath),
                             sdb, wc_id, FORMAT_FROM_SDB,
                             db->verify_format, db->enforce_empty_wq,
                             db->state_pool, scratch_pool);
@@ -737,7 +744,10 @@ try_symlink_as_dir:
         }
 
       SVN_ERR(svn_wc__db_pdh_create_wcroot(wcroot,
-                            apr_pstrdup(db->state_pool, local_abspath),
+                            apr_pstrdup(db->state_pool,
+                                        symlink_wcroot_abspath
+                                          ? symlink_wcroot_abspath
+                                          : local_abspath),
                             NULL, UNKNOWN_WC_ID, wc_format,
                             db->verify_format, db->enforce_empty_wq,
                             db->state_pool, scratch_pool));
@@ -747,6 +757,13 @@ try_symlink_as_dir:
     {
       const char *dir_relpath;
 
+      if (symlink_wcroot_abspath)
+        {
+          /* The WCROOT was found through a symlink pointing at the root of
+           * the WC. Cache the WCROOT under the symlink's path. */
+          local_dir_abspath = symlink_wcroot_abspath;
+        }
+
       /* The subdirectory's relpath is easily computed relative to the
          wcroot that we just found.  */
       dir_relpath = compute_relpath(*wcroot, local_dir_abspath, NULL);
@@ -809,6 +826,7 @@ try_symlink_as_dir:
                                              scratch_pool));
           if (resolved_kind == svn_node_dir)
             {
+              symlink_wcroot_abspath = original_abspath;
               SVN_ERR(read_link_target(&local_abspath, original_abspath,
                                        scratch_pool));
               /* This handle was opened in this function but is not going

Modified: subversion/branches/move-tracking-1/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/libsvn_wc/workqueue.c?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/move-tracking-1/subversion/libsvn_wc/workqueue.c Mon Aug 19 11:21:01 2013
@@ -143,6 +143,7 @@ run_base_remove(work_item_baton_t *wqb,
   SVN_ERR(svn_wc__db_base_remove(db, local_abspath,
                                  FALSE /* keep_as_working */,
                                  TRUE /* queue_deletes */,
+                                 FALSE /* remove_locks */,
                                  not_present_rev,
                                  NULL, NULL, scratch_pool));
 

Modified: subversion/branches/move-tracking-1/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-1/subversion/mod_dav_svn/version.c?rev=1515362&r1=1515361&r2=1515362&view=diff
==============================================================================
--- subversion/branches/move-tracking-1/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/move-tracking-1/subversion/mod_dav_svn/version.c Mon Aug 19 11:21:01 2013
@@ -1033,8 +1033,11 @@ dav_svn__checkin(dav_resource *resource,
 
           if (serr)
             {
+              int status;
+
               if (serr->apr_err == SVN_ERR_FS_CONFLICT)
                 {
+                  status = HTTP_CONFLICT;
                   msg = apr_psprintf(resource->pool,
                                      "A conflict occurred during the CHECKIN "
                                      "processing. The problem occurred with  "
@@ -1042,10 +1045,12 @@ dav_svn__checkin(dav_resource *resource,
                                      conflict_msg);
                 }
               else
-                msg = "An error occurred while committing the transaction.";
+                {
+                  status = HTTP_INTERNAL_SERVER_ERROR;
+                  msg = "An error occurred while committing the transaction.";
+                }
 
-              return dav_svn__convert_err(serr, HTTP_CONFLICT, msg,
-                                          resource->pool);
+              return dav_svn__convert_err(serr, status, msg, resource->pool);
             }
           else
             {
@@ -1540,8 +1545,11 @@ merge(dav_resource *target,
       if (serr)
         {
           const char *msg;
+          int status;
+
           if (serr->apr_err == SVN_ERR_FS_CONFLICT)
             {
+              status = HTTP_CONFLICT;
               /* ### we need to convert the conflict path into a URI */
               msg = apr_psprintf(pool,
                                  "A conflict occurred during the MERGE "
@@ -1550,9 +1558,12 @@ merge(dav_resource *target,
                                  conflict);
             }
           else
-            msg = "An error occurred while committing the transaction.";
+            {
+              status = HTTP_INTERNAL_SERVER_ERROR;
+              msg = "An error occurred while committing the transaction.";
+            }
 
-          return dav_svn__convert_err(serr, HTTP_CONFLICT, msg, pool);
+          return dav_svn__convert_err(serr, status, msg, pool);
         }
       else
         {