Author: julianfoad
Date: Wed Apr  6 16:05:49 2022
New Revision: 1899622

URL: http://svn.apache.org/viewvc?rev=1899622&view=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: progress on trans_tests.py 1.

The test fails because detranslated fixed-length keywords are not as expected:

W: text base item 3, Expected: ::   $
W: text base item 3, Got:      :: f#$

* subversion/tests/cmdline/trans_tests.py
  (keywords_from_birth): Read text-base from repo when not available locally in
    pristines-on-demand mode, and make it XFail then.

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

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=1899622&r1=1899621&r2=1899622&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 Apr  6 16:05:49 2022
@@ -213,7 +213,7 @@ def keywords_off(path):
 ### This test is know to fail when Subversion is built in very deep
 ### directory structures, caused by SVN_KEYWORD_MAX_LEN being defined
 ### as 255.
-@Wimp("Relies on wc.text_base_path()")
+@XFail(lambda: svntest.main.options.wc_format_version=='1.15')
 def keywords_from_birth(sbox):
   "commit new files with keywords active from birth"
 
@@ -394,9 +394,16 @@ def keywords_from_birth(sbox):
     '$URL::x%sx$\n' % (' ' * len(url_expand_test_data))
     ]
 
-  fp = open(svntest.wc.text_base_path(fixed_length_keywords_path), 'r')
-  actual_textbase_kw = fp.readlines()
-  fp.close()
+  # Read the text base. In pristines-on-demand mode it isn't stored locally
+  # after commit, so read it from the repo.
+  if sbox.pristines_on_demand_enabled():
+    _, actual_textbase_kw, _ = svntest.main.run_svn(False,
+                                 'cat', '-rHEAD', fixed_length_keywords_path)
+  else:
+    fp = open(svntest.wc.text_base_path(fixed_length_keywords_path), 'r')
+    actual_textbase_kw = fp.readlines()
+    fp.close()
+
   check_keywords(actual_textbase_kw, kw_textbase, "text base")
 
   # Check the Id keyword for filename with spaces.


Reply via email to