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 2010/05/26 17:09:56 UTC
svn commit: r948472 - /subversion/trunk/subversion/libsvn_wc/upgrade.c
Author: hwright
Date: Wed May 26 15:09:56 2010
New Revision: 948472
URL: http://svn.apache.org/viewvc?rev=948472&view=rev
Log:
Add a few stubs and ifdef'd out sections for a future upgrade to format 18
for the pristine work.
* subversion/libsvn_wc/upgrade.c
(wipe_obsolete_files): Add section to remove the text-base directory.
(bump_to_18): New.
(svn_wc__upgrade_sdb): Add ifdef'd out section for upgrading to format 18.
Also, move the creation of the pristine directory to this section.
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=948472&r1=948471&r2=948472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Wed May 26 15:09:56 2010
@@ -430,6 +430,15 @@ wipe_obsolete_files(const char *wcroot_a
FALSE, NULL, NULL, scratch_pool));
#endif
+#if 0 /* Conditional upon upgrading to format 18 */
+ /* Remove the old text-base directory. */
+ svn_error_clear(svn_io_remove_dir2(
+ svn_wc__adm_child(wcroot_abspath,
+ TEXT_BASE_SUBDIR,
+ scratch_pool),
+ FALSE, NULL, NULL, scratch_pool));
+#endif
+
/* Remove the old-style lock file LAST. */
svn_error_clear(svn_io_remove_file2(
build_lockfile_path(wcroot_abspath, scratch_pool),
@@ -1105,6 +1114,13 @@ bump_to_17(void *baton, svn_sqlite__db_t
}
+static svn_error_t *
+bump_to_18(void *baton, svn_sqlite__db_t *sdb, apr_pool_t *scratch_pool)
+{
+ return SVN_NO_ERROR;
+}
+
+
#if 0 /* ### no tree conflict migration yet */
/* */
@@ -1194,7 +1210,6 @@ svn_wc__upgrade_sdb(int *result_format,
case 16:
{
struct bump_to_17_baton b17;
- const char *pristine_dir;
b17.wcroot_abspath = wcroot_abspath;
b17.original_format = start_format;
@@ -1202,15 +1217,29 @@ svn_wc__upgrade_sdb(int *result_format,
/* Move the properties into the database. */
SVN_ERR(svn_sqlite__with_transaction(sdb, bump_to_17, &b17,
scratch_pool));
+ }
+
+ *result_format = 17;
+ /* FALLTHROUGH */
+#endif
+
+#if 0
+ case 17:
+ {
+ const char *pristine_dir;
/* Create the '.svn/pristine' directory. */
pristine_dir = svn_wc__adm_child(wcroot_abspath,
SVN_WC__ADM_PRISTINE,
scratch_pool);
SVN_ERR(svn_io_dir_make(pristine_dir, APR_OS_DEFAULT, scratch_pool));
+
+ /* Move text bases into the pristine directory, and update the db */
+ SVN_ERR(svn_sqlite__with_transaction(sdb, bump_to_18, &b18,
+ scratch_pool));
}
- *result_format = 17;
+ *result_format = 18;
/* FALLTHROUGH */
#endif