Author: stsp
Date: Thu Oct 13 15:32:23 2011
New Revision: 1182909
URL: http://svn.apache.org/viewvc?rev=1182909&view=rev
Log:
* subversion/libsvn_wc/upgrade.c
(upgrade_to_wcng): If the upgrade fails because of corrupt 1.6 meta
data in entries files, ask users to check out a new working copy.
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=1182909&r1=1182908&r2=1182909&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Thu Oct 13 15:32:23 2011
@@ -1404,6 +1404,7 @@ upgrade_to_wcng(void **dir_baton,
svn_wc_entry_t *this_dir;
const char *old_wcroot_abspath, *dir_relpath;
apr_hash_t *text_bases_info;
+ svn_error_t *err;
/* Don't try to mess with the WC if there are old log files left. */
@@ -1475,11 +1476,18 @@ upgrade_to_wcng(void **dir_baton,
data->sdb, scratch_pool, scratch_pool));
/***** ENTRIES - WRITE *****/
- SVN_ERR(svn_wc__write_upgraded_entries(dir_baton, parent_baton, db,
data->sdb,
- data->repos_id, data->wc_id,
- dir_abspath, data->root_abspath,
- entries, text_bases_info,
- result_pool, scratch_pool));
+ err = svn_wc__write_upgraded_entries(dir_baton, parent_baton, db, data->sdb,
+ data->repos_id, data->wc_id,
+ dir_abspath, data->root_abspath,
+ entries, text_bases_info,
+ result_pool, scratch_pool);
+ if (err && err->apr_err == SVN_ERR_WC_CORRUPT)
+ return svn_error_quick_wrap(err,
+ _("This working copy is corrupt and "
+ "cannot be upgraded. Please check out "
+ "a new working copy."));
+ else
+ SVN_ERR(err);
/***** WC PROPS *****/
/* If we don't know precisely where the wcprops are, ignore them. */