On 2019-10-15 17:17, Johan Corveleyn wrote:
On Tue, Oct 15, 2019 at 9:26 AM Yasuhito FUTATSUKI <futat...@poem.co.jp> wrote:

On 2019-10-15 07:04, Daniel Shahaf wrote:
Yasuhito FUTATSUKI wrote on Sun, 13 Oct 2019 04:01 +00:00:
On 2019/10/13 7:24, Daniel Shahaf wrote:

I see. Now I agree it would suffice here.

So, how about:

1. Make the test use non-binary mode for changing and reading the
      file 'lambda'.

2. Locally revert the C part of r1841731 and make sure the modified test
      still (correctly) fails.  (That revision both added the test and
      fixed the bug the test checks for.)

I overlooked comments in this test. On step 2 the test will continue to loop
as far as resource is available, or until signaled.

And yes, after 'svn merge -r1841731:1841730 
subversion/libsvn_client/conflicts.c',
the test can't reach patched line. So no more test is needed on step 2, both
on Unix/Linux and on Windows.


So it looks sufficient to me.

Cool.  Will you perchance have time to do this?  No worries if not.

Yes, I'll do it on FreeBSD on tonight or tomorrow night (in JST :)).

with the attached patch, both with Python 2.7.15 and Python 3.7.0 on FreeBSD,
tree_conflict_tests passed.

However I think it is also need to test for each 1 and 2 on Windows,
because r1841736 and r1841743 also were attempt to fix this test
on Windows, with Python 2.

Feel free to let me know if I need to test something on Windows.

Thank you. Could you please test the tree_conflict_tests with this patch,
both with Python 2 and Python 3 on Windows?

Thanks,
--
Yasuhito FUTATSUKI <futat...@poem.co.jp>
Index: subversion/tests/cmdline/svnadmin_tests.py
===================================================================
--- subversion/tests/cmdline/svnadmin_tests.py  (revision 1868481)
+++ subversion/tests/cmdline/svnadmin_tests.py  (working copy)
@@ -3859,7 +3859,7 @@
                                      sbox.repo_url)
 
   dump_lines = svntest.actions.run_and_verify_dump(sbox.repo_dir)
-  assert propval + '\n' in dump_lines
+  assert propval.encode() + b'\n' in dump_lines
 
 def check_recover_prunes_rep_cache(sbox, enable_rep_sharing):
   """Check 'recover' prunes the rep-cache while enable-rep-sharing is
Index: subversion/tests/cmdline/tree_conflict_tests.py
===================================================================
--- subversion/tests/cmdline/tree_conflict_tests.py     (revision 1868481)
+++ subversion/tests/cmdline/tree_conflict_tests.py     (working copy)
@@ -1518,7 +1518,7 @@
   sbox.simple_move('A/B', 'A/B2')
   sbox.simple_commit()
   sbox.simple_update()
-  main.file_append_binary(sbox.ospath("A/B2/lambda"), "This is more 
content.\n")
+  main.file_append(sbox.ospath("A/B2/lambda"), "This is more content.\n")
   sbox.simple_commit()
   sbox.simple_update()
 
@@ -1541,7 +1541,7 @@
   # If everything works as expected the resolver will recommended a
   # resolution option and 'svn' will resolve the conflict automatically.
   # Verify that 'A1/B/lambda' contains the merged content:
-  contents = open(sbox.ospath('A1/B/lambda'), 'rb').readlines()
+  contents = open(sbox.ospath('A1/B/lambda'), 'r').readlines()
   svntest.verify.compare_and_display_lines(
     "A1/B/lambda has unexpectected contents", sbox.ospath("A1/B/lambda"),
     [ "This is the file 'lambda'.\n", "This is more content.\n"], contents)

Reply via email to