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 2010/11/22 12:40:04 UTC

svn commit: r1037676 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: julianfoad
Date: Mon Nov 22 11:40:04 2010
New Revision: 1037676

URL: http://svn.apache.org/viewvc?rev=1037676&view=rev
Log:
A follow-up to r1036598.

* subversion/libsvn_wc/wc_db.c
  (op_depth_for_copy): Also take and check the repos id.
  (svn_wc__db_op_copy_dir, svn_wc__db_op_copy_file): Adjust callers.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1037676&r1=1037675&r2=1037676&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon Nov 22 11:40:04 2010
@@ -3397,12 +3397,13 @@ svn_wc__db_op_copy_tree(svn_wc__db_t *db
 }
 
 
-/* If COPYFROM_RELPATH and COPYFROM_REVISION "match" the copyfrom
+/* If COPYFROM_REPOS_ID+COPYFROM_RELPATH+COPYFROM_REVISION "match" the copyfrom
    information for the parent of LOCAL_RELPATH then set *OP_DEPTH to
    the op_depth of the parent, otherwise set *OP_DEPTH to the op_depth
    of LOCAL_RELPATH. */
 static svn_error_t *
 op_depth_for_copy(apr_int64_t *op_depth,
+                  apr_int64_t copyfrom_repos_id,
                   const char *copyfrom_relpath,
                   svn_revnum_t copyfrom_revision,
                   svn_wc__db_pdh_t *pdh,
@@ -3432,12 +3433,15 @@ op_depth_for_copy(apr_int64_t *op_depth,
       SVN_ERR(convert_to_working_status(&status, status));
       if (status == svn_wc__db_status_added)
         {
+          apr_int64_t parent_copyfrom_repos_id
+            = svn_sqlite__column_int64(stmt, 10);
           const char *parent_copyfrom_relpath
             = svn_sqlite__column_text(stmt, 11, NULL);
           svn_revnum_t parent_copyfrom_revision
             = svn_sqlite__column_revnum(stmt, 12);
-      
-          if (copyfrom_revision == parent_copyfrom_revision
+
+          if (parent_copyfrom_repos_id == copyfrom_repos_id
+              && copyfrom_revision == parent_copyfrom_revision
               && !strcmp(svn_relpath_join(parent_copyfrom_relpath, name,
                                           scratch_pool),
                          copyfrom_relpath))
@@ -3509,8 +3513,8 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
       iwb.original_revnum = original_revision;
     }
 
-  /* Should we do this inside the transaction? */
-  SVN_ERR(op_depth_for_copy(&iwb.op_depth,
+  /* ### Should we do this inside the transaction? */
+  SVN_ERR(op_depth_for_copy(&iwb.op_depth, iwb.original_repos_id,
                             original_repos_relpath, original_revision,
                             pdh, local_relpath, scratch_pool));
 
@@ -3586,8 +3590,8 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
       iwb.original_revnum = original_revision;
     }
 
-  /* Should we do this inside the transaction? */
-  SVN_ERR(op_depth_for_copy(&iwb.op_depth,
+  /* ### Should we do this inside the transaction? */
+  SVN_ERR(op_depth_for_copy(&iwb.op_depth, iwb.original_repos_id,
                             original_repos_relpath, original_revision,
                             pdh, local_relpath, scratch_pool));