[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Re: Issue #3354: copy operation during update fails

From: Paul Burba <ptburba_at_gmail.com>
Date: Mon, 19 Jan 2009 11:17:27 -0500

On Sat, Jan 17, 2009 at 8:43 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Sat, Jan 17, 2009 at 03:40:57AM +0000, Stefan Sperling wrote:
>> On Tue, Jan 13, 2009 at 08:45:36PM +0000, Stefan Sperling wrote:
>> > I'm still hoping to get more eyes on trying to spot the real
>> > bug though.
>>
>> Looks like the diff at the end of this mail fixes the problem
>> properly.
>
>> I did not commit yet because I got test failures that happened during
>> make check, but which I could not reproduce by running the failing tests
>> individually.
>
> I ran make check again today and got 0 failures.
> So I committed my diff in r35303.
>
> We still need to fix update_test 52, so I'll leave issue #3354 open
> to track the status of the test.
>
> Stefan
>
>> Paul, I also tried running your test with this diff, without the XFail.
>> But I could not get the test to do anything useful. All it does is
>> complain about the root node of the working copy, and I don't understand
>> what's going on there:
>>
>> $ ./update_tests.py 52 2>&1
>> =============================================================
>> Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' in output tree are different!
>> =============================================================
>> EXPECTED NODE TO BE:
>> =============================================================
>> * Node name: __SVN_ROOT_NODE
>> Path: __SVN_ROOT_NODE
>> Contents: N/A (node is a directory)
>> Properties: {}
>> Attributes: {}
>> Children: 1
>> =============================================================
>> ACTUAL NODE FOUND:
>> =============================================================
>> * Node name: __SVN_ROOT_NODE
>> Path: __SVN_ROOT_NODE
>> Contents: None
>> Properties: {}
>> Attributes: {}
>> Children: None (node is probably a file)
>> Unequal Types: one Node is a file, the other is a directory
>> Output of commit is unexpected
>> EXPECTED OUTPUT TREE:
>> ROOT
>> +-- svn-test-work
>> +-- working_copies
>> +-- update_tests-52
>> +-- A
>> +-- B
>> +-- E
>> +-- alpha.moved
>> ACTUAL OUTPUT TREE:
>> ROOT
>> ACTUAL OUTPUT TREE:
>> svntest.wc.State('svn-test-work/working_copies/update_tests-52/', {
>> })
>> EXCEPTION: SVNTreeUnequal
>> Traceback (most recent call last):
>> File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1310, in run
>> rc = self.pred.run(**kw)
>> File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 121, in run
>> return self.func(sandbox)
>> File "./update_tests.py", line 4205, in update_moves_and_modifies_an_edited_file
>> wc_dir)

Stefan,

So the commit of r3, 'Make a text mod to A/B/E/alpha.moved in the
first WC' is failing. I can't replicate this on my Windows box (nor
does the djh-xp-vse2005 box show it, but I see similar failures on all
the non-Windows buildbots. So yeah, something is wrong with the test
or some more general part of the test suite. Could you post the
complete log for update_tests.py 52 along with the post-test verbose
status of the 'other' WC that the test creates? That might shed some
light on the problem.

>> File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 1133, in run_and_verify_commit
>> tree.compare_trees ("output", actual, output_tree)
>> File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/tree.py", line 609, in compare_trees
>> raise SVNTreeUnequal
>> SVNTreeUnequal
>> FAIL: update_tests.py 52: update moves and modifies a file with edits
>>
>> Note that the expected status is as shown above in the output
>> of my reproduction script. Can you look into the test again
>> and see if you can make it fail without the diff and pass with
>> the diff? That would be great help! Thanks.
>>
>> Stefan

I updated the test in r35322 so we expect an update which moves a
locally edited to file to result in a text conflict on the move
destination and a tree conflict on the move source. That is this what
you expect after r35303 right?

Ok, weirdness ahead:

Using trunk_at_35321 update_tests.py 52 still fails for me the same as it
ever did (i.e. the alpha.moved cannot be found error):

C:\SVN\src-trunk\Release\subversion\tests\cmdline>update_tests.py 52 -v
CMD: svnadmin.exe create "svn-test-work\local_tmp\repos"
--bdb-txn-nosync <TIME = 0.109000>
  .
<snip>
  .
CMD: svn.exe up
"svn-test-work\working_copies\update_tests-52.other\A\B\E"
--config-dir "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config"
--passwor
d rayjandom --no-auth-cache --username jrandom CMD: C : \ S V N \ s r
c - t r u n k \ R e l e a s e \ s u b v e r s i o n \ s v n \ s v n .
e x e u p " s v n - t e s t - w o r
k \ w o r k i n g _ c o p i e s \ u p d a t e _ t e s t s - 5 2 . o t
h e r \ A \ B \ E " - - c o n f i g - d i r " C : \ S V N \ s r c
- t r u n k \ R e l e a s e \ s u b v e
r s i o n \ t e s t s \ c m d l i n e \ s v n - t e s t - w o r k \ l
o c a l _ t m p \ c o n f i g " - - p a s s w o r d r a y j a n d
o m - - n o - a u t h - c a c h e -
- u s e r n a m e j r a n d o m exited with 1
<TIME = 0.125000>

  Note: Obviously there is a problem printing this
  exit message to the log on Windows, but I can't
  see how that would be related to this test.
  I see it in other tests as well.

   C svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha
C svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha.moved
svn: In directory 'svn-test-work\working_copies\update_tests-52.other\A\B\E'
svn: Can't open file
'svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha.moved':
The system cannot find the file specified.
Traceback (most recent call last):
  File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
line 1310, in run
    rc = self.pred.run(**kw)
  File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\testcase.py",
line 121, in run
    return self.func(sandbox)
  File "C:\SVN\src-trunk\Release\subversion\tests\cmdline\update_tests.py",
line 4263, in update_moves_and_modifies_an_edited_file
    True)
  File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\actions.py",
line 726, in run_and_verify_update
    *args)
  File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
line 648, in run_svn
    *(_with_auth(_with_config_dir(varargs))))
  File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
line 371, in run_command
    None, *varargs)
  File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
line 583, in run_command_stdin
    raise Failure
Failure
XFAIL: update_tests.py 52: update moves and modifies a file with edits

C:\SVN\src-trunk\Release\subversion\tests\cmdline>svn st
svn-test-work\working_copies\update_tests-52.other
! L svn-test-work\working_copies\update_tests-52.other\A\B\E
? svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha.moved.copied
? svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha.moved.r3
? svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha.moved.mine
A + C svn-test-work\working_copies\update_tests-52.other\A\B\E\alpha
> local edit, incoming delete upon update

But if I put a break in update_tests.py 52 just prior to the last
update and then run that last update myself from the command line,
then there is no error, and everything looks correct:

trunk_at_35322>svn st update_tests-52.other
M update_tests-52.other\A\B\E\alpha

trunk_at_35322>svn diff update_tests-52.other
Index: update_tests-52.other/A/B/E/alpha
===================================================================
--- update_tests-52.other/A/B/E/alpha (revision 1)
+++ update_tests-52.other/A/B/E/alpha (working copy)
@@ -1 +1 @@
-This is the file 'alpha'.
+alpha, modified

trunk_at_35322>svn up update_tests-52.other\A\B\E
   C update_tests-52.other\A\B\E\alpha
Conflict discovered in 'update_tests-52.other/A/B/E/alpha.moved'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options: p
C update_tests-52.other\A\B\E\alpha.moved
Updated to revision 3.
Summary of conflicts:
  Text conflicts: 1
  Tree conflicts: 1

trunk_at_35322>svn st update_tests-52.other
? update_tests-52.other\A\B\E\alpha.moved.copied
? update_tests-52.other\A\B\E\alpha.moved.r3
? update_tests-52.other\A\B\E\alpha.moved.mine
A + C update_tests-52.other\A\B\E\alpha
> local edit, incoming delete upon update
C update_tests-52.other\A\B\E\alpha.moved

trunk_at_35322>type update_tests-52.other\A\B\E\alpha
alpha, modified

trunk_at_35322>type update_tests-52.other\A\B\E\alpha.moved
<<<<<<< .mine
alpha, modified
=======
alpha, modified after move
>>>>>>> .r3

I've checked the paths in my test setup scripts, thinking the test run
was using the wrong svn.exe, but everything looks correct. Completely
perplexed by this.

Paul
Received on 2009-01-19 17:20:23 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.