You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2022/11/23 14:02:11 UTC
svn commit: r1905490 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: libsvn_client/ libsvn_wc/ tests/cmdline/ tests/cmdline/svntest/ tests/libsvn_wc/
Author: kotkov
Date: Wed Nov 23 14:02:11 2022
New Revision: 1905490
URL: http://svn.apache.org/viewvc?rev=1905490&view=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: Without any functional change,
switch to a more lightweight internal term "optional pristine" when talking
about the new low-level working copy capabilities.
* subversion/libsvn_wc/wc-metadata.sql
(STMT_UPGRADE_TO_32): Tweak comment.
* subversion/libsvn_wc/wc.h
(SVN_WC__PRISTINES_ON_DEMAND_VERSION): Rename to…
(SVN_WC__HAS_OPTIONAL_PRISTINE): …this.
(SVN_WC__SETTINGS_VERSION): Rename to…
(SVN_WC__HAS_SETTINGS): …this, for consistency.
* subversion/libsvn_client/client.h
(svn_client__compatible_wc_version_pristines_on_demand): Rename to…
(svn_client__compatible_wc_version_optional_pristine): …this.
* subversion/libsvn_client/checkout.c,
subversion/libsvn_client/upgrade.c,
subversion/libsvn_wc/adm_files.c,
subversion/libsvn_wc/wc_db.c,
subversion/libsvn_wc/wc_db_pristine.c,
subversion/libsvn_wc/wc_db_wcroot.c,
subversion/tests/libsvn_wc/pristine-store-test.c:
(): Update symbol references.
* subversion/tests/cmdline/svntest/main.py
(is_wc_pristines_on_demand_supported): Rename to…
(wc_supports_optional_pristine): …this.
* subversion/tests/cmdline/store_pristine_tests.py
(): Update symbol references.
* subversion/tests/cmdline/trans_tests.py
(keywords_from_birth): Tweak comment.
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/checkout.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/adm_files.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc-metadata.sql
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc.h
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_pristine.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_wcroot.c
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/main.py
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/trans_tests.py
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/libsvn_wc/pristine-store-test.c
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/checkout.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/checkout.c Wed Nov 23 14:02:11 2022
@@ -282,7 +282,7 @@ svn_client_checkout4(svn_revnum_t *resul
if (store_pristine == svn_tristate_false)
{
const svn_version_t *required_version =
- svn_client__compatible_wc_version_pristines_on_demand(pool);
+ svn_client__compatible_wc_version_optional_pristine(pool);
if (!svn_version__at_least(wc_format_version,
required_version->major,
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h Wed Nov 23 14:02:11 2022
@@ -1261,9 +1261,9 @@ svn_client__textbase_sync(const char *lo
apr_pool_t *scratch_pool);
/* Returns the first version that supported the working copy metadata format
- * where pristines can be fetched on demand. */
+ * where pristine content is optional and can be fetched on demand. */
const svn_version_t *
-svn_client__compatible_wc_version_pristines_on_demand(apr_pool_t *result_pool);
+svn_client__compatible_wc_version_optional_pristine(apr_pool_t *result_pool);
#ifdef __cplusplus
}
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c Wed Nov 23 14:02:11 2022
@@ -275,7 +275,7 @@ svn_client_latest_wc_version(apr_pool_t
}
const svn_version_t *
-svn_client__compatible_wc_version_pristines_on_demand(apr_pool_t *result_pool)
+svn_client__compatible_wc_version_optional_pristine(apr_pool_t *result_pool)
{
/* NOTE: For consistency, always return the version of the client
that first introduced the format. */
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/adm_files.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/adm_files.c Wed Nov 23 14:02:11 2022
@@ -287,7 +287,7 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
_("Working copy format %d can't be created by client version %s."),
target_format, SVN_VER_NUM);
- if (target_format < SVN_WC__PRISTINES_ON_DEMAND_VERSION && !store_pristine)
+ if (target_format < SVN_WC__HAS_OPTIONAL_PRISTINE && !store_pristine)
return svn_error_createf(
SVN_ERR_WC_UNSUPPORTED_FORMAT, NULL,
_("Working copy format %d does not support the requested capabilities"),
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc-metadata.sql?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc-metadata.sql Wed Nov 23 14:02:11 2022
@@ -708,7 +708,7 @@ WHERE l.op_depth = 0
/* ------------------------------------------------------------------------- */
-/* Format 32 adds support for optional text-base contents with the
+/* Format 32 adds support for optional pristine contents with the
following schema changes:
- Add the 'hydrated' column to the PRISTINE table.
- Add the I_PRISTINE_UNREFERENCED index.
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc.h?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc.h Wed Nov 23 14:02:11 2022
@@ -162,7 +162,7 @@ extern "C" {
* == 1.10.x shipped with format 31
* == 1.11.x shipped with format 31
*
- * The bump to 32 adds the pristine-on-demand feature; see the docstring
+ * The bump to 32 adds support for optional pristine contents; see the docstring
* of STMT_UPGRADE_TO_32 for details.
*
* == 1.15.x shipped with format 32 and multi-wc-format support
@@ -219,12 +219,12 @@ extern "C" {
sqlite_stat1 table on opening */
#define SVN_WC__ENSURE_STAT1_TABLE 31
-/* Starting from this version, pristines can be missing and fetched on
- * demand. */
-#define SVN_WC__PRISTINES_ON_DEMAND_VERSION 32
+/* Starting from this version, pristine content is optional and can be
+ * fetched on demand. */
+#define SVN_WC__HAS_OPTIONAL_PRISTINE 32
/* Starting from this version, the DB stores per-WC settings. */
-#define SVN_WC__SETTINGS_VERSION 32
+#define SVN_WC__HAS_SETTINGS 32
/* Return a string indicating the released version (or versions) of
* Subversion that used WC format number WC_FORMAT, or some other
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db.c Wed Nov 23 14:02:11 2022
@@ -1390,7 +1390,7 @@ init_db(/* output values */
SVN_ERR(svn_sqlite__get_statement(&stmt, db, STMT_INSERT_WCROOT));
SVN_ERR(svn_sqlite__insert(wc_id, stmt));
- if (target_format >= SVN_WC__SETTINGS_VERSION)
+ if (target_format >= SVN_WC__HAS_SETTINGS)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, db, STMT_UPSERT_SETTINGS));
SVN_ERR(svn_sqlite__bindf(stmt, "id", *wc_id, store_pristine));
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_pristine.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_pristine.c Wed Nov 23 14:02:11 2022
@@ -124,7 +124,7 @@ stmt_select_pristine(svn_boolean_t *have
/* Check that this pristine text is present in the store. (The presence
* of the file is not sufficient.) */
- stmt_num = (wcroot->format >= SVN_WC__PRISTINES_ON_DEMAND_VERSION
+ stmt_num = (wcroot->format >= SVN_WC__HAS_OPTIONAL_PRISTINE
? STMT_SELECT_PRISTINE_F32
: STMT_SELECT_PRISTINE_F31);
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_num));
@@ -377,13 +377,13 @@ pristine_install_txn(svn_wc__db_wcroot_t
SVN_ERR(svn_io_remove_file2(pristine_abspath, TRUE, scratch_pool));
}
- stmt_num = (wcroot->format >= SVN_WC__PRISTINES_ON_DEMAND_VERSION
+ stmt_num = (wcroot->format >= SVN_WC__HAS_OPTIONAL_PRISTINE
? STMT_UPSERT_PRISTINE_F32 : STMT_UPSERT_PRISTINE_F31);
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_num));
SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, sha1_checksum, scratch_pool));
SVN_ERR(svn_sqlite__bind_checksum(stmt, 2, md5_checksum, scratch_pool));
SVN_ERR(svn_sqlite__bind_int64(stmt, 3, install_data->size));
- if (wcroot->format >= SVN_WC__PRISTINES_ON_DEMAND_VERSION)
+ if (wcroot->format >= SVN_WC__HAS_OPTIONAL_PRISTINE)
SVN_ERR(svn_sqlite__bind_int(stmt, 4, install_stream != NULL));
SVN_ERR(svn_sqlite__insert(NULL, stmt));
@@ -585,14 +585,14 @@ maybe_transfer_one_pristine(svn_wc__db_w
svn_sqlite__stmt_t *stmt;
int affected_rows;
- stmt_num = (dst_wcroot->format >= SVN_WC__PRISTINES_ON_DEMAND_VERSION
+ stmt_num = (dst_wcroot->format >= SVN_WC__HAS_OPTIONAL_PRISTINE
? STMT_INSERT_OR_IGNORE_PRISTINE_F32
: STMT_INSERT_OR_IGNORE_PRISTINE_F31);
SVN_ERR(svn_sqlite__get_statement(&stmt, dst_wcroot->sdb, stmt_num));
SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, checksum, scratch_pool));
SVN_ERR(svn_sqlite__bind_checksum(stmt, 2, md5_checksum, scratch_pool));
SVN_ERR(svn_sqlite__bind_int64(stmt, 3, size));
- if (dst_wcroot->format >= SVN_WC__PRISTINES_ON_DEMAND_VERSION)
+ if (dst_wcroot->format >= SVN_WC__HAS_OPTIONAL_PRISTINE)
SVN_ERR(svn_sqlite__bind_int(stmt, 4, hydrated));
SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
@@ -677,7 +677,7 @@ pristine_transfer_txn(svn_wc__db_wcroot_
svn_boolean_t got_row;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
- stmt_num = (dst_wcroot->format >= SVN_WC__PRISTINES_ON_DEMAND_VERSION
+ stmt_num = (dst_wcroot->format >= SVN_WC__HAS_OPTIONAL_PRISTINE
? STMT_SELECT_COPY_PRISTINES_F32
: STMT_SELECT_COPY_PRISTINES_F31);
SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb, stmt_num));
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_wcroot.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_wcroot.c Wed Nov 23 14:02:11 2022
@@ -506,7 +506,7 @@ read_settings(svn_boolean_t *store_prist
apr_int64_t wc_id,
apr_pool_t *scratch_pool)
{
- if (format >= SVN_WC__SETTINGS_VERSION)
+ if (format >= SVN_WC__HAS_SETTINGS)
{
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py Wed Nov 23 14:02:11 2022
@@ -59,7 +59,7 @@ def simple_checkout_with_pristine(sbox):
'info', '--show-item=store-pristine', '--no-newline',
sbox.wc_dir)
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def simple_checkout_without_pristine(sbox):
"simple checkout without pristine"
@@ -108,7 +108,7 @@ def simple_commit_with_pristine(sbox):
expected_output,
expected_status)
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def simple_commit_without_pristine(sbox):
"simple commit without pristine"
@@ -181,7 +181,7 @@ def simple_update_with_pristine(sbox):
[], False,
'-r1', sbox.wc_dir)
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def simple_update_without_pristine(sbox):
"simple update without pristine"
@@ -278,7 +278,7 @@ def simple_status_with_pristine(sbox):
svntest.actions.run_and_verify_status(sbox.wc_dir,
expected_status)
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def simple_status_without_pristine(sbox):
"simple status without pristine"
@@ -366,7 +366,7 @@ def simple_diff_with_pristine(sbox):
svntest.actions.run_and_verify_svn(diff_output, [],
'diff', sbox.ospath('file'))
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def simple_diff_without_pristine(sbox):
"simple diff without pristine"
@@ -431,7 +431,7 @@ def simple_revert_with_pristine(sbox):
svntest.actions.run_and_verify_status(sbox.wc_dir,
expected_status)
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def simple_revert_without_pristine(sbox):
"simple revert without pristine"
@@ -508,7 +508,7 @@ def update_modified_file_with_pristine(s
expected_disk,
expected_status)
-@SkipUnless(svntest.main.is_wc_pristines_on_demand_supported)
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
def update_modified_file_without_pristine(sbox):
"update locally modified file without pristine"
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/main.py?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/main.py Wed Nov 23 14:02:11 2022
@@ -1778,7 +1778,7 @@ def wc_format(ver=None):
return 31
raise Exception("Unrecognized version number '%s'" % (ver,))
-def is_wc_pristines_on_demand_supported():
+def wc_supports_optional_pristine():
if options.wc_format_version is None:
return True
else:
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/trans_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/trans_tests.py?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/trans_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/trans_tests.py Wed Nov 23 14:02:11 2022
@@ -393,8 +393,7 @@ def keywords_from_birth(sbox):
'$URL::x%sx$\n' % (' ' * len(url_expand_test_data))
]
- # Read the text base. In pristines-on-demand mode it isn't stored locally
- # after commit, so read it from the repo.
+ # Read the text base, either from a locally stored file or from the repo.
if svntest.actions.get_wc_store_pristine(wc_dir):
fp = open(svntest.wc.text_base_path(fixed_length_keywords_path), 'r')
actual_textbase_kw = fp.readlines()
Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1905490&r1=1905489&r2=1905490&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/libsvn_wc/pristine-store-test.c Wed Nov 23 14:02:11 2022
@@ -332,7 +332,7 @@ pristine_install_dehydrated(const svn_te
SVN_ERR(svn_wc__format_from_version(&wc_format, opts->wc_format_version, pool));
- if (wc_format < SVN_WC__PRISTINES_ON_DEMAND_VERSION)
+ if (wc_format < SVN_WC__HAS_OPTIONAL_PRISTINE)
return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
"Not supported in WC format under test");
@@ -443,7 +443,7 @@ pristine_dehydrate(const svn_test_opts_t
SVN_ERR(svn_wc__format_from_version(&wc_format, opts->wc_format_version, pool));
- if (wc_format < SVN_WC__PRISTINES_ON_DEMAND_VERSION)
+ if (wc_format < SVN_WC__HAS_OPTIONAL_PRISTINE)
return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
"Not supported in WC format under test");