Author: danielsh
Date: Sat Feb 26 16:37:03 2022
New Revision: 1898445
URL: http://svn.apache.org/viewvc?rev=1898445&view=rev
Log:
multi-wc-format: Verify that it's possible to upgrade first to f31 and then
to f32.
* subversion/tests/cmdline/svntest/main.py
(wc_format): Add docstring. Take an optional argument.
* subversion/tests/cmdline/upgrade_tests.py
(basic_upgrade): Extend the test to run a second 'svn upgrade'.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/main.py
subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1898445&r1=1898444&r2=1898445&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Sat Feb 26
16:37:03 2022
@@ -1748,8 +1748,16 @@ def is_httpd_authz_provider_enabled():
def is_remote_http_connection_allowed():
return options.allow_remote_http_connection
-def wc_format():
- ver = (options.wc_format_version or DEFAULT_COMPATIBLE_VERSION)
+def wc_format(ver=None):
+ """Return the WC format number used by Subversion version VER.
+
+ VER should be a version string such as '1.15' or '1.15.0' or '1.15.0-beta2'.
+
+ If omitted, the format number of new working copies, as expected to be
+ created by 'svn checkout' without '--compatible-version', is returned.
+ """
+ if not ver:
+ ver = (options.wc_format_version or DEFAULT_COMPATIBLE_VERSION)
minor = int(ver.split('.')[1])
if minor >= 15 and minor <= SVN_VER_MINOR:
return 32
Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests.py?rev=1898445&r1=1898444&r2=1898445&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/upgrade_tests.py Sat Feb 26
16:37:03 2022
@@ -290,10 +290,33 @@ def basic_upgrade(sbox):
check_format(sbox, get_current_format())
# Now check the contents of the working copy
+ # This verification is repeated below.
expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
run_and_verify_status_no_server(sbox.wc_dir, expected_status)
check_pristine(sbox, ['iota', 'A/mu'])
+ # Upgrade again to the latest format.
+ #
+ # This may or may not be a no-op, depending on whether the test suite was
+ # launched with --wc-format-version / WC_FORMAT_VERSION set a version that
+ # uses the same format as SVN_VER_MAJOR.SVN_VER_MINOR.
+ to_version = svntest.main.svn_wc__max_supported_format_version()
+ if svntest.main.wc_format() == svntest.main.wc_format(to_version):
+ # Upgrade is a no-op
+ expected_stdout = []
+ else:
+ # Upgrade is not a no-op
+ expected_stdout = "Upgraded '.*'"
+ svntest.actions.run_and_verify_svn(expected_stdout, [],
+ 'upgrade',
+ '--compatible-version',
+ to_version, sbox.wc_dir)
+ check_format(sbox, svntest.main.wc_format(to_version))
+
+ # Repeat the same verification as above
+ run_and_verify_status_no_server(sbox.wc_dir, expected_status)
+ check_pristine(sbox, ['iota', 'A/mu'])
+
def upgrade_with_externals(sbox):
"upgrade with externals"