Author: kotkov
Date: Wed Jan 18 11:58:12 2023
New Revision: 1906765
URL: http://svn.apache.org/viewvc?rev=1906765&view=rev
Log:
Remove the `store_pristine` argument from svn_wc__upgrade().
When upgrading a WC-NG working copy, we migrate the current pristine mode
without an ability to change it, so the argument is actually unused.
When upgrading a pre-NG working copy, we know that the working copy
stores pristines, so this can be specified explicitly.
* subversion/include/private/svn_wc_private.h
(svn_wc__upgrade): Remove the `store_pristine` argument.
* subversion/libsvn_client/upgrade.c
(upgrade_externals_from_properties,
upgrade_external_item,
upgrade_internal): Remove the `store_pristine` argument.
(svn_client_upgrade2): Adjust this calling site of upgrade_internal().
* subversion/libsvn_wc/deprecated.c
(svn_wc_upgrade): Adjust this calling site of svn_wc__upgrade().
* subversion/libsvn_wc/upgrade.c
(svn_wc__upgrade): Remove the `store_pristine` argument. Explicitly pass
the appropriate value when upgrading a pre-NG working copy.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_client/upgrade.c
subversion/trunk/subversion/libsvn_wc/deprecated.c
subversion/trunk/subversion/libsvn_wc/upgrade.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1906765&r1=1906764&r2=1906765&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed Jan 18
11:58:12 2023
@@ -2287,9 +2287,8 @@ svn_wc__ensure_adm(svn_wc_context_t *wc_
/**
* Upgrade the working copy at @a local_abspath to the metadata storage
- * format indicated by @a target_format. Use the @a store_pristine
- * settings value for the upgraded working copy. @a local_abspath
- * should be an absolute path to the root of the working copy.
+ * format indicated by @a target_format. @a local_abspath should be
+ * an absolute path to the root of the working copy.
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at
* various points during the operation. If it returns an error
@@ -2310,7 +2309,6 @@ svn_error_t *
svn_wc__upgrade(svn_wc_context_t *wc_ctx,
const char *local_abspath,
int target_format,
- svn_boolean_t store_pristine,
svn_wc_upgrade_get_repos_info_t repos_info_func,
void *repos_info_baton,
svn_cancel_func_t cancel_func,
Modified: subversion/trunk/subversion/libsvn_client/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/upgrade.c?rev=1906765&r1=1906764&r2=1906765&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_client/upgrade.c Wed Jan 18 11:58:12 2023
@@ -93,14 +93,12 @@ static svn_error_t *
upgrade_externals_from_properties(svn_client_ctx_t *ctx,
const char *local_abspath,
int wc_format,
- svn_boolean_t store_pristine,
struct repos_info_baton *info_baton,
apr_pool_t *scratch_pool);
static svn_error_t *
upgrade_internal(const char *path,
int wc_format,
- svn_boolean_t store_pristine,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
@@ -118,8 +116,7 @@ upgrade_internal(const char *path,
_("'%s' is not a local path"), path);
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
- SVN_ERR(svn_wc__upgrade(ctx->wc_ctx, local_abspath,
- wc_format, store_pristine,
+ SVN_ERR(svn_wc__upgrade(ctx->wc_ctx, local_abspath, wc_format,
fetch_repos_info, &info_baton,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
@@ -158,8 +155,7 @@ upgrade_internal(const char *path,
if (kind == svn_node_dir)
{
svn_error_t *err = upgrade_internal(ext_abspath, wc_format,
- store_pristine, ctx,
- iterpool);
+ ctx, iterpool);
if (err)
{
@@ -183,8 +179,7 @@ upgrade_internal(const char *path,
/* Upgrading from <= 1.6, or no svn:properties defined.
(There is no way to detect the difference from libsvn_client :( ) */
- SVN_ERR(upgrade_externals_from_properties(ctx, local_abspath,
- wc_format, store_pristine,
+ SVN_ERR(upgrade_externals_from_properties(ctx, local_abspath, wc_format,
&info_baton, scratch_pool));
}
@@ -205,7 +200,7 @@ svn_client_upgrade2(const char *path,
SVN_ERR(svn_wc__format_from_version(&wc_format,
wc_format_version,
scratch_pool));
- SVN_ERR(upgrade_internal(path, wc_format, TRUE, ctx, scratch_pool));
+ SVN_ERR(upgrade_internal(path, wc_format, ctx, scratch_pool));
return SVN_NO_ERROR;
}
@@ -288,7 +283,6 @@ svn_client__compatible_wc_version_option
static svn_error_t *
upgrade_external_item(svn_client_ctx_t *ctx,
int wc_format,
- svn_boolean_t store_pristine,
const char *externals_parent_abspath,
const char *externals_parent_url,
const char *externals_parent_repos_root_url,
@@ -331,8 +325,7 @@ upgrade_external_item(svn_client_ctx_t *
{
svn_error_clear(err);
- SVN_ERR(upgrade_internal(external_abspath, wc_format, store_pristine,
- ctx, scratch_pool));
+ SVN_ERR(upgrade_internal(external_abspath, wc_format, ctx,
scratch_pool));
}
else if (err)
return svn_error_trace(err);
@@ -406,7 +399,6 @@ static svn_error_t *
upgrade_externals_from_properties(svn_client_ctx_t *ctx,
const char *local_abspath,
int wc_format,
- svn_boolean_t store_pristine,
struct repos_info_baton *info_baton,
apr_pool_t *scratch_pool)
{
@@ -495,7 +487,7 @@ upgrade_externals_from_properties(svn_cl
item = APR_ARRAY_IDX(externals_p, i, svn_wc_external_item2_t*);
svn_pool_clear(inner_iterpool);
- err = upgrade_external_item(ctx, wc_format, store_pristine,
+ err = upgrade_external_item(ctx, wc_format,
externals_parent_abspath,
externals_parent_url,
externals_parent_repos_root_url,
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1906765&r1=1906764&r2=1906765&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Wed Jan 18 11:58:12 2023
@@ -5179,7 +5179,7 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
void *notify_baton,
apr_pool_t *scratch_pool)
{
- return svn_wc__upgrade(wc_ctx, local_abspath, SVN_WC__DEFAULT_VERSION, TRUE,
+ return svn_wc__upgrade(wc_ctx, local_abspath, SVN_WC__DEFAULT_VERSION,
repos_info_func, repos_info_baton,
cancel_func, cancel_baton,
notify_func, notify_baton,
Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1906765&r1=1906764&r2=1906765&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Wed Jan 18 11:58:12 2023
@@ -2026,7 +2026,6 @@ svn_error_t *
svn_wc__upgrade(svn_wc_context_t *wc_ctx,
const char *local_abspath,
int target_format,
- svn_boolean_t store_pristine,
svn_wc_upgrade_get_repos_info_t repos_info_func,
void *repos_info_baton,
svn_cancel_func_t cancel_func,
@@ -2129,7 +2128,7 @@ svn_wc__upgrade(svn_wc_context_t *wc_ctx
&data.repos_id, &data.wc_id,
db, target_format, data.root_abspath,
this_dir->repos, this_dir->uuid,
- store_pristine, scratch_pool));
+ TRUE, scratch_pool));
/* Migrate the entries over to the new database.
### We need to think about atomicity here.