Re: [PATCH] copy_tests.py - expand move_file_back_and_forth, to verify issue #3429

2010-12-08 Thread Johan Corveleyn
On Wed, Dec 8, 2010 at 3:17 PM, Julian Foad  wrote:
> On Wed, 2010-11-17, Johan Corveleyn wrote:
>> On Wed, Nov 17, 2010 at 2:14 AM, Johan Corveleyn  wrote:
>> > The attached patch expands the test "move_file_back_and_forth"
>> > (copy_tests.py 45) as a regression test for issue#3429.
> [...]
>> I just realized that I can add a similar check to
>> move_dir_back_and_forth. Here is a second patch that expands both
>> tests.
>
> Thank you, Johan.  Committed revision 1043427.  (I tweaked the comments
> a bit.)
>
> I have closed issue #3429.

Thanks!

>> (note: can the "if svntest.main.wc_is_singledb(wc_dir)" be dropped
>> from move_dir_back_and_forth?)
>
> Because single-db is now always enabled?  Yes.  But it's sometimes nice
> to be able to go back and test older code with the current tests, so
> let's not hurry to remove it.

Ok, got it.

Cheers,
-- 
Johan


Re: [PATCH] copy_tests.py - expand move_file_back_and_forth, to verify issue #3429

2010-12-08 Thread Julian Foad
On Wed, 2010-11-17, Johan Corveleyn wrote:
> On Wed, Nov 17, 2010 at 2:14 AM, Johan Corveleyn  wrote:
> > The attached patch expands the test "move_file_back_and_forth"
> > (copy_tests.py 45) as a regression test for issue#3429.
[...]
> I just realized that I can add a similar check to
> move_dir_back_and_forth. Here is a second patch that expands both
> tests.

Thank you, Johan.  Committed revision 1043427.  (I tweaked the comments
a bit.)

I have closed issue #3429.

> (note: can the "if svntest.main.wc_is_singledb(wc_dir)" be dropped
> from move_dir_back_and_forth?)

Because single-db is now always enabled?  Yes.  But it's sometimes nice
to be able to go back and test older code with the current tests, so
let's not hurry to remove it.

- Julian


> Log message:
> [[[
> Expand move_file_back_and_forth and move_dir_back_and_forth tests to verify
> issue #3429 ("svn mv A B; svn mv B A" generates replace without history).
> 
> * subversion/tests/cmdline/copy_tests.py
>   (move_file_back_and_forth): Check expected status before commit.
>   (move_dir_back_and_forth): Check expected status after executing the moves.
> ]]]





Re: [PATCH] copy_tests.py - expand move_file_back_and_forth, to verify issue #3429

2010-11-16 Thread Johan Corveleyn
On Wed, Nov 17, 2010 at 2:14 AM, Johan Corveleyn  wrote:
> The attached patch expands the test "move_file_back_and_forth"
> (copy_tests.py 45) as a regression test for issue#3429.
>
> [[[
> Expand move_file_back_and_forth test to verify issue #3429
> ("svn mv A B; svn mv B A" generates replace without history).
>
> * subversion/tests/cmdline/copy_tests.py
>  (move_file_back_and_forth): Check expected status before commit.
> ]]]

I just realized that I can add a similar check to
move_dir_back_and_forth. Here is a second patch that expands both
tests.

(note: can the "if svntest.main.wc_is_singledb(wc_dir)" be dropped
from move_dir_back_and_forth?)

Log message:
[[[
Expand move_file_back_and_forth and move_dir_back_and_forth tests to verify
issue #3429 ("svn mv A B; svn mv B A" generates replace without history).

* subversion/tests/cmdline/copy_tests.py
  (move_file_back_and_forth): Check expected status before commit.
  (move_dir_back_and_forth): Check expected status after executing the moves.
]]]

Cheers,
-- 
Johan
Index: subversion/tests/cmdline/copy_tests.py
===
--- subversion/tests/cmdline/copy_tests.py  (revision 1035851)
+++ subversion/tests/cmdline/copy_tests.py  (working copy)
@@ -2428,17 +2428,27 @@ def move_file_back_and_forth(sbox):
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
  rho_move_path, rho_path)
 
+  # Create expected status tree before commit
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-'),
+})
+
+  # Test status before commit
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
   # Created expected output tree for 'svn ci':
   expected_output = svntest.wc.State(wc_dir, {
 'A/D/G/rho' : Item(verb='Replacing'),
 })
 
-  # Create expected status tree
+  # Create expected status tree after commit
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
 'A/D/G/rho' : Item(status='  ', wc_rev=2),
 })
 
+  # Test commit output and status
   svntest.actions.run_and_verify_commit(wc_dir,
 expected_output,
 expected_status,
@@ -2474,6 +2484,23 @@ def move_dir_back_and_forth(sbox):
   svntest.actions.run_and_verify_svn(None, None, expected_err,
  'mv', D_move_path, D_path)
 
+  if svntest.main.wc_is_singledb(wc_dir):
+# Verify if status indicates a replace with history
+expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+expected_status.add({
+  'A/D'   : Item(status='R ', copied='+', wc_rev='-'),
+  'A/D/G' : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/G/pi'  : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/G/rho' : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/G/tau' : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/gamma' : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/H' : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/H/chi' : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/H/omega'   : Item(status='  ', copied='+', wc_rev='-'),
+  'A/D/H/psi' : Item(status='  ', copied='+', wc_rev='-'),
+  })
+svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
 def copy_move_added_paths(sbox):
   "copy and move added paths without commits"
 


[PATCH] copy_tests.py - expand move_file_back_and_forth, to verify issue #3429

2010-11-16 Thread Johan Corveleyn
The attached patch expands the test "move_file_back_and_forth"
(copy_tests.py 45) as a regression test for issue#3429.

[[[
Expand move_file_back_and_forth test to verify issue #3429
("svn mv A B; svn mv B A" generates replace without history).

* subversion/tests/cmdline/copy_tests.py
  (move_file_back_and_forth): Check expected status before commit.
]]]

Cheers,
-- 
Johan
Index: subversion/tests/cmdline/copy_tests.py
===
--- subversion/tests/cmdline/copy_tests.py  (revision 1035851)
+++ subversion/tests/cmdline/copy_tests.py  (working copy)
@@ -2428,17 +2428,27 @@ def move_file_back_and_forth(sbox):
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
  rho_move_path, rho_path)
 
+  # Create expected status tree before commit
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-'),
+})
+
+  # Test status before commit
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
   # Created expected output tree for 'svn ci':
   expected_output = svntest.wc.State(wc_dir, {
 'A/D/G/rho' : Item(verb='Replacing'),
 })
 
-  # Create expected status tree
+  # Create expected status tree after commit
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
 'A/D/G/rho' : Item(status='  ', wc_rev=2),
 })
 
+  # Test commit output and status
   svntest.actions.run_and_verify_commit(wc_dir,
 expected_output,
 expected_status,