You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/08/23 13:37:25 UTC

svn commit: r988082 - /subversion/trunk/subversion/libsvn_wc/upgrade.c

Author: philip
Date: Mon Aug 23 11:37:24 2010
New Revision: 988082

URL: http://svn.apache.org/viewvc?rev=988082&view=rev
Log:
Make 1.6 to single-db upgrade migrate text-bases to the root.

* subversion/libsvn_wc/upgrade.c
  (migrate_text_bases): Rename wcroot_abspath parameter and add a second
   root path parameter, copy text-bases from one root to the other.
  (bump_to_17): Pass the same root path twice.
  (upgrade_to_wcng): Pass old and new root paths.

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

Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=988082&r1=988081&r2=988082&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Mon Aug 23 11:37:24 2010
@@ -1061,14 +1061,15 @@ bump_to_18(void *baton, svn_sqlite__db_t
 
 
 static svn_error_t *
-migrate_text_bases(const char *wcroot_abspath,
+migrate_text_bases(const char *old_wcroot_abspath,
+                   const char *new_wcroot_abspath,
                    svn_sqlite__db_t *sdb,
                    apr_pool_t *scratch_pool)
 {
   apr_hash_t *dirents;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_hash_index_t *hi;
-  const char *text_base_dir = svn_wc__adm_child(wcroot_abspath,
+  const char *text_base_dir = svn_wc__adm_child(old_wcroot_abspath,
                                                 TEXT_BASE_SUBDIR,
                                                 scratch_pool);
 
@@ -1116,7 +1117,7 @@ migrate_text_bases(const char *wcroot_ab
       SVN_ERR(svn_sqlite__insert(NULL, stmt));
 
       SVN_ERR(svn_wc__db_pristine_get_future_path(&pristine_path,
-                                                  wcroot_abspath,
+                                                  new_wcroot_abspath,
                                                   sha1_checksum,
                                                   iterpool, iterpool));
 
@@ -1144,7 +1145,8 @@ bump_to_17(void *baton, svn_sqlite__db_t
   const char *wcroot_abspath = ((struct bump_baton *)baton)->wcroot_abspath;
 
   SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_UPGRADE_TO_17));
-  SVN_ERR(migrate_text_bases(wcroot_abspath, sdb, scratch_pool));
+  SVN_ERR(migrate_text_bases(wcroot_abspath, wcroot_abspath, sdb,
+                             scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1306,7 +1308,8 @@ upgrade_to_wcng(svn_wc__db_t *db,
                                                  scratch_pool));
     }
 
-  SVN_ERR(migrate_text_bases(dir_abspath, data->sdb, scratch_pool));
+  SVN_ERR(migrate_text_bases(dir_abspath, data->root_abspath, data->sdb,
+                             scratch_pool));
 
 #if (SVN_WC__VERSION >= 18)
   /* Upgrade all the properties (including "this dir").