[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Remove svn_wc__db_temp_reset_format()

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Wed, 9 Feb 2011 22:43:08 +0000

I'm looking at some of the temp functions introduced early in the
development of wc-ng. I suspect some of them can be removed, but just
want to check and see if I'm missing something.

The svn_wc__db_temp_reset_format() function is only used in the
upgrade process, but I'm not really sure its intent. Does anybody
familiar with the process know? (the upgrade tests all pass (or
appropriately xfail) with this patch.)

-Hyrum

[[[

Index: subversion/libsvn_wc/wc_db.c
===================================================================
--- subversion/libsvn_wc/wc_db.c (revision 1069151)
+++ subversion/libsvn_wc/wc_db.c (working copy)
@@ -7225,43 +7225,8 @@ svn_wc__db_temp_get_format(int *format,
   return SVN_NO_ERROR;
 }

-
 /* ### temporary API. remove before release. */
 svn_error_t *
-svn_wc__db_temp_reset_format(int format,
- svn_wc__db_t *db,
- const char *local_dir_abspath,
- apr_pool_t *scratch_pool)
-{
- svn_wc__db_pdh_t *pdh;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_dir_abspath));
- SVN_ERR_ASSERT(format >= 1);
- /* ### assert that we were passed a directory? */
-
- /* Do not create a PDH. If we don't have one, then we don't have any
- cached version information. */
- pdh = svn_wc__db_pdh_get_or_create(db, local_dir_abspath, FALSE,
- scratch_pool);
- if (pdh != NULL)
- {
- /* ### ideally, we would reset this to UNKNOWN, and then read the working
- ### copy to see what format it is in. however, we typically *write*
- ### whatever we *read*. so to break the cycle and write a different
- ### version (during upgrade), then we have to force a new format. */
-
- /* ### since this is a temporary API, I feel I can indulge in a hack
- ### here. If we are upgrading *to* wc-ng, we need to blow away the
- ### pdh->wcroot member. If we are upgrading to format 11 (pre-wc-ng),
- ### we just need to store the format number. */
- pdh->wcroot = NULL;
- }
-
- return SVN_NO_ERROR;
-}
-
-/* ### temporary API. remove before release. */
-svn_error_t *
 svn_wc__db_temp_forget_directory(svn_wc__db_t *db,
                                  const char *local_dir_abspath,
                                  apr_pool_t *scratch_pool)
Index: subversion/libsvn_wc/wc_db.h
===================================================================
--- subversion/libsvn_wc/wc_db.h (revision 1069151)
+++ subversion/libsvn_wc/wc_db.h (working copy)
@@ -2303,14 +2303,6 @@ svn_wc__db_temp_get_format(int *format,
                            const char *local_dir_abspath,
                            apr_pool_t *scratch_pool);

-/* ### reset any cached format version. it has probably changed. */
-svn_error_t *
-svn_wc__db_temp_reset_format(int format,
- svn_wc__db_t *db,
- const char *local_dir_abspath,
- apr_pool_t *scratch_pool);
-
-
 /* ### temp functions to manage/store access batons within the DB. */
 svn_wc_adm_access_t *
 svn_wc__db_temp_get_access(svn_wc__db_t *db,
Index: subversion/libsvn_wc/upgrade.c
===================================================================
--- subversion/libsvn_wc/upgrade.c (revision 1069151)
+++ subversion/libsvn_wc/upgrade.c (working copy)
@@ -1263,8 +1263,6 @@ upgrade_to_wcng(void **dir_baton,
          entries_write_new() writes in current format rather than
          f12. Thus, this function bumps a working copy all the way to
          current. */
- SVN_ERR(svn_wc__db_temp_reset_format(SVN_WC__VERSION, db,
- data->root_abspath, scratch_pool));
       SVN_ERR(svn_wc__db_wclock_obtain(db, data->root_abspath, 0, FALSE,
                                        scratch_pool));
     }
]]]
Received on 2011-02-09 23:43:49 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.