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/30 10:44:28 UTC

svn commit: r1905643 - /subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py

Author: kotkov
Date: Wed Nov 30 10:44:28 2022
New Revision: 1905643

URL: http://svn.apache.org/viewvc?rev=1905643&view=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: Add a test for an attempt to
checkout into an existing working copy while changing the --store-pristine
setting.

* subversion/tests/cmdline/store_pristine_tests.py
  (checkout_incompatible_setting): New test.
  (test_list): Run new test.

Modified:
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/store_pristine_tests.py

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=1905643&r1=1905642&r2=1905643&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 30 10:44:28 2022
@@ -829,6 +829,39 @@ def move_modified_file_without_pristine(
   svntest.actions.run_and_verify_status(sbox.wc_dir,
                                         expected_status)
 
+@SkipUnless(svntest.main.wc_supports_optional_pristine)
+def checkout_incompatible_setting(sbox):
+  "checkout with incompatible pristine setting"
+
+  sbox.build(empty=True, create_wc=False)
+  expected_output = svntest.wc.State(sbox.wc_dir, {})
+  expected_wc = svntest.wc.State('', {})
+  svntest.actions.run_and_verify_checkout(sbox.repo_url,
+                                          sbox.wc_dir,
+                                          expected_output,
+                                          expected_wc,
+                                          [],
+                                          '--store-pristine=yes')
+  svntest.actions.run_and_verify_svn(
+    ['yes'], [],
+    'info', '--show-item=store-pristine', '--no-newline',
+    sbox.wc_dir)
+
+  expected_output = svntest.wc.State(sbox.wc_dir, {})
+  expected_wc = svntest.wc.State('', {})
+  expected_error = "svn: E155042: .*" # SVN_ERR_WC_INCOMPATIBLE_SETTINGS
+  svntest.actions.run_and_verify_checkout(sbox.repo_url,
+                                          sbox.wc_dir,
+                                          expected_output,
+                                          expected_wc,
+                                          expected_error,
+                                          '--store-pristine=no')
+  # Ensure that the settings didn't change.
+  svntest.actions.run_and_verify_svn(
+    ['yes'], [],
+    'info', '--show-item=store-pristine', '--no-newline',
+    sbox.wc_dir)
+
 ########################################################################
 # Run the tests
 
@@ -857,6 +890,7 @@ test_list = [ None,
               simple_move_without_pristine,
               move_modified_file_with_pristine,
               move_modified_file_without_pristine,
+              checkout_incompatible_setting,
              ]
 serial_only = True