You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/02/23 18:58:33 UTC

svn commit: r1073854 - in /subversion/trunk: subversion/libsvn_wc/wc_db.c tools/server-side/svn-populate-node-origins-index.c

Author: hwright
Date: Wed Feb 23 17:58:33 2011
New Revision: 1073854

URL: http://svn.apache.org/viewvc?rev=1073854&view=rev
Log:
Followup to r1073821 to fix test failures currently evident on the bots.

[ Note: This introduces another stat(), but in a relatively unused place in
  the code.  And the API *does* claim to be a temp API, so it really shouldn't
  matter, right? ]

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_temp_op_set_file_external): Make sure we locate the proper
    dir_abspath when setting file externals.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/tools/server-side/svn-populate-node-origins-index.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=1073854&r1=1073853&r2=1073854&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Feb 23 17:58:33 2011
@@ -8623,13 +8623,21 @@ svn_wc__db_temp_op_set_file_external(svn
   if (!got_row)
     {
       const char *repos_root_url, *repos_uuid;
+      const char *dir_abspath;
+      svn_node_kind_t kind;
       apr_int64_t repos_id;
 
       if (!repos_relpath)
         return SVN_NO_ERROR; /* Don't add a BASE node */
 
+      SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
+      if (kind == svn_node_dir)
+        dir_abspath = local_abspath;
+      else
+        dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+
       SVN_ERR(svn_wc__db_scan_base_repos(NULL, &repos_root_url,
-                                         &repos_uuid, db, local_abspath,
+                                         &repos_uuid, db, dir_abspath,
                                          scratch_pool, scratch_pool));
 
       SVN_ERR(fetch_repos_id(&repos_id, repos_root_url, repos_uuid,

Modified: subversion/trunk/tools/server-side/svn-populate-node-origins-index.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svn-populate-node-origins-index.c?rev=1073854&r1=1073853&r2=1073854&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svn-populate-node-origins-index.c (original)
+++ subversion/trunk/tools/server-side/svn-populate-node-origins-index.c Wed Feb 23 17:58:33 2011
@@ -96,8 +96,7 @@ index_revision_adds(int *count, svn_fs_t
       if ((change->change_kind == svn_fs_path_change_add)
           || (change->change_kind == svn_fs_path_change_replace))
         {
-          if (! (change->copyfrom_path
-                            && SVN_IS_VALID_REVNUM(change->copyfrom_rev)))
+          if (!change->copyfrom_known)
             {
               svn_revnum_t origin;
               SVN_ERR(svn_fs_node_origin_rev(&origin, root, path, subpool));