CCing dev, which I meant to do from the start
On Fri, Apr 17, 2009 at 4:20 PM, Paul Burba <ptburba_at_gmail.com> wrote:
> Stefan,
>
> As I mentioned in IRC patch test 4 fails on Windows:
>
> C:\SVN\src-trunk\Release\subversion\tests\cmdline>patch_tests.py 4 -v
> CMD: svnadmin.exe create "svn-test-work\local_tmp\repos"
> --bdb-txn-nosync <TIME = 0.078000>
> CMD: svn.exe import -m "Log message for revision 1."
> "svn-test-work\local_tmp\greekfiles"
> "file:///C%3A/SVN/src-trunk/Release/subversion/tests/cmdline/svn-test-work/local_tmp/repos
> " --config-dir "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config"
> --password rayjandom --no-auth-cache --username jrandom <TIME =
> 0.141000>
> Adding svn-test-work\local_tmp\greekfiles\A
> Adding svn-test-work\local_tmp\greekfiles\A\B
> Adding svn-test-work\local_tmp\greekfiles\A\B\lambda
> Adding svn-test-work\local_tmp\greekfiles\A\B\E
> Adding svn-test-work\local_tmp\greekfiles\A\B\E\alpha
> Adding svn-test-work\local_tmp\greekfiles\A\B\E\beta
> Adding svn-test-work\local_tmp\greekfiles\A\B\F
> Adding svn-test-work\local_tmp\greekfiles\A\mu
> Adding svn-test-work\local_tmp\greekfiles\A\C
> Adding svn-test-work\local_tmp\greekfiles\A\D
> Adding svn-test-work\local_tmp\greekfiles\A\D\gamma
> Adding svn-test-work\local_tmp\greekfiles\A\D\G
> Adding svn-test-work\local_tmp\greekfiles\A\D\G\pi
> Adding svn-test-work\local_tmp\greekfiles\A\D\G\rho
> Adding svn-test-work\local_tmp\greekfiles\A\D\G\tau
> Adding svn-test-work\local_tmp\greekfiles\A\D\H
> Adding svn-test-work\local_tmp\greekfiles\A\D\H\chi
> Adding svn-test-work\local_tmp\greekfiles\A\D\H\omega
> Adding svn-test-work\local_tmp\greekfiles\A\D\H\psi
> Adding svn-test-work\local_tmp\greekfiles\iota
>
> Committed revision 1.
> CMD: svnadmin.exe create "svn-test-work\repositories\patch_tests-4"
> --bdb-txn-nosync <TIME = 0.078000>
> CMD: svnadmin.exedump svn-test-work\local_tmp\repos | svnadmin.exeload
> svn-test-work\repositories\patch_tests-4 --ignore-uuid <TIME =
> 0.000000>
> CMD: svn.exe co
> "file:///C%3A/SVN/src-trunk/Release/subversion/tests/cmdline/svn-test-work/repositories/patch_tests-4"
> "svn-test-work\working_copies\patch_tests-4" --config-dir "C:
> \SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config"
> --password rayjandom --no-auth-cache --username jrandom <TIME =
> 0.359000>
> A svn-test-work\working_copies\patch_tests-4\A
> A svn-test-work\working_copies\patch_tests-4\A\B
> A svn-test-work\working_copies\patch_tests-4\A\B\lambda
> A svn-test-work\working_copies\patch_tests-4\A\B\E
> A svn-test-work\working_copies\patch_tests-4\A\B\E\alpha
> A svn-test-work\working_copies\patch_tests-4\A\B\E\beta
> A svn-test-work\working_copies\patch_tests-4\A\B\F
> A svn-test-work\working_copies\patch_tests-4\A\mu
> A svn-test-work\working_copies\patch_tests-4\A\C
> A svn-test-work\working_copies\patch_tests-4\A\D
> A svn-test-work\working_copies\patch_tests-4\A\D\gamma
> A svn-test-work\working_copies\patch_tests-4\A\D\G
> A svn-test-work\working_copies\patch_tests-4\A\D\G\pi
> A svn-test-work\working_copies\patch_tests-4\A\D\G\rho
> A svn-test-work\working_copies\patch_tests-4\A\D\G\tau
> A svn-test-work\working_copies\patch_tests-4\A\D\H
> A svn-test-work\working_copies\patch_tests-4\A\D\H\chi
> A svn-test-work\working_copies\patch_tests-4\A\D\H\omega
> A svn-test-work\working_copies\patch_tests-4\A\D\H\psi
> A svn-test-work\working_copies\patch_tests-4\iota
> Checked out revision 1.
> CMD: svn.exe patch
> "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\tmpuqeczt"
> . --config-dir "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-
> work\local_tmp\config" --password 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
> p a t c h " 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 \ t m p u q e c z t
> " . - - 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.078000>
> svn: Unable to lock
> 'C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\working_copies\patch_tests-4\A\B\E'
> UNEXPECTED STDERR:
> svn: Unable to lock
> 'C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\working_copies\patch_tests-4\A\B\E'
> EXCEPTION: SVNUnexpectedStderr
> Traceback (most recent call last):
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 1138, in run
> rc = self.pred.run(sandbox)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\testcase.py",
> line 114, in run
> return self.func(sandbox)
> File "C:\SVN\src-trunk\Release\subversion\tests\cmdline\patch_tests.py",
> line 425, in patch_unidiff_absolute_paths
> 0) # dry-run
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\actions.py",
> line 983, in run_and_verify_patch
> raise verify.SVNUnexpectedStderr
> SVNUnexpectedStderr
> FAIL: patch_tests.py 4: apply a unidiff patch containing absolute paths
> Traceback (most recent call last):
> File "C:\SVN\src-trunk\Release\subversion\tests\cmdline\patch_tests.py",
> line 439, in <module>
> svntest.main.run_tests(test_list)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 1526, in run_tests
> safe_rmtree(temp_dir, 1)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 650, in safe_rmtree
> rmtree(dirname)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 637, in rmtree
> shutil.rmtree(dirname)
> File "C:\Python26\lib\shutil.py", line 221, in rmtree
> onerror(os.remove, fullname, sys.exc_info())
> File "C:\Python26\lib\shutil.py", line 219, in rmtree
> os.remove(fullname)
> WindowsError: [Error 32] The process cannot access the file because it
> is being used by another process:
> 'svn-test-work\\local_tmp\\tmpuqeczt'
>
> The first problem is that the test writes a patch file with both '/'
> and '\' path separators:
>
> C:\SVN\src-trunk\Release\subversion\tests\cmdline>type
> "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\tmpuqeczt"
> diff -ur A/B/E/alpha.orig A/B/E/alpha
> --- C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\working_copies\patch_tests-4/A/B/E/alpha.orig
> Thu Apr 16 19:49:53 2009
> +++ C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\working_copies\patch_tests-4/A/B/E/alpha
> Thu Apr 16 19:50:30 2009
> @@ -1 +1,2 @@
> This is the file 'alpha'.
> +Whoooo whooooo whoooooooo!
> diff -ur A/B/lambda.orig A/B/lambda
> --- /A/B/lambda.orig Thu Apr 16 19:49:53 2009
> +++ /A/B/lambda Thu Apr 16 19:51:25 2009
> @@ -1 +1 @@
> -This is the file 'lambda'.
> +It's the file 'lambda', who would have thought!
>
> That can be fixed with this simple patch:
>
> [[[
> Index: subversion/tests/cmdline/patch_tests.py
> ===================================================================
> --- subversion/tests/cmdline/patch_tests.py (revision 37337)
> +++ subversion/tests/cmdline/patch_tests.py (working copy)
> @@ -25,6 +25,7 @@
> import tempfile
> import textwrap
> import zlib
> +import posixpath
>
> # Our testing module
> import svntest
> @@ -377,6 +378,8 @@
> # The second diff does not point inside the working copy so application
> # should fail.
> abs = os.path.abspath('.')
> + if sys.platform == 'win32':
> + abs = abs.replace("\\", "/")
> unidiff_patch = [
> "diff -ur A/B/E/alpha.orig A/B/E/alpha\n"
> "--- %s/A/B/E/alpha.orig\tThu Apr 16 19:49:53 2009\n" % abs,
> ]]]
>
> Then the test gets a bit further before failing:
>
>
> C:\SVN\src-trunk\Release\subversion\tests\cmdline>patch_tests.py 4 -v
> CMD: svnadmin.exe create "svn-test-work\local_tmp\repos"
> --bdb-txn-nosync <TIME = 0.078000>
> CMD: svn.exe import -m "Log message for revision 1."
> "svn-test-work\local_tmp\greekfiles"
> "file:///C%3A/SVN/src-trunk/Release/subversion/tests/cmdline/svn-test-work/local_tmp/repos
> " --config-dir "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config"
> --password rayjandom --no-auth-cache --username jrandom <TIME =
> 0.140000>
> Adding svn-test-work\local_tmp\greekfiles\A
> Adding svn-test-work\local_tmp\greekfiles\A\B
> Adding svn-test-work\local_tmp\greekfiles\A\B\lambda
> Adding svn-test-work\local_tmp\greekfiles\A\B\E
> Adding svn-test-work\local_tmp\greekfiles\A\B\E\alpha
> Adding svn-test-work\local_tmp\greekfiles\A\B\E\beta
> Adding svn-test-work\local_tmp\greekfiles\A\B\F
> Adding svn-test-work\local_tmp\greekfiles\A\mu
> Adding svn-test-work\local_tmp\greekfiles\A\C
> Adding svn-test-work\local_tmp\greekfiles\A\D
> Adding svn-test-work\local_tmp\greekfiles\A\D\gamma
> Adding svn-test-work\local_tmp\greekfiles\A\D\G
> Adding svn-test-work\local_tmp\greekfiles\A\D\G\pi
> Adding svn-test-work\local_tmp\greekfiles\A\D\G\rho
> Adding svn-test-work\local_tmp\greekfiles\A\D\G\tau
> Adding svn-test-work\local_tmp\greekfiles\A\D\H
> Adding svn-test-work\local_tmp\greekfiles\A\D\H\chi
> Adding svn-test-work\local_tmp\greekfiles\A\D\H\omega
> Adding svn-test-work\local_tmp\greekfiles\A\D\H\psi
> Adding svn-test-work\local_tmp\greekfiles\iota
>
> Committed revision 1.
> CMD: svnadmin.exe create "svn-test-work\repositories\patch_tests-4"
> --bdb-txn-nosync <TIME = 0.078000>
> CMD: svnadmin.exedump svn-test-work\local_tmp\repos | svnadmin.exeload
> svn-test-work\repositories\patch_tests-4 --ignore-uuid <TIME =
> 0.016000>
> CMD: svn.exe co
> "file:///C%3A/SVN/src-trunk/Release/subversion/tests/cmdline/svn-test-work/repositories/patch_tests-4"
> "svn-test-work\working_copies\patch_tests-4" --config-dir "C:
> \SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config"
> --password rayjandom --no-auth-cache --username jrandom <TIME =
> 0.312000>
> A svn-test-work\working_copies\patch_tests-4\A
> A svn-test-work\working_copies\patch_tests-4\A\B
> A svn-test-work\working_copies\patch_tests-4\A\B\lambda
> A svn-test-work\working_copies\patch_tests-4\A\B\E
> A svn-test-work\working_copies\patch_tests-4\A\B\E\alpha
> A svn-test-work\working_copies\patch_tests-4\A\B\E\beta
> A svn-test-work\working_copies\patch_tests-4\A\B\F
> A svn-test-work\working_copies\patch_tests-4\A\mu
> A svn-test-work\working_copies\patch_tests-4\A\C
> A svn-test-work\working_copies\patch_tests-4\A\D
> A svn-test-work\working_copies\patch_tests-4\A\D\gamma
> A svn-test-work\working_copies\patch_tests-4\A\D\G
> A svn-test-work\working_copies\patch_tests-4\A\D\G\pi
> A svn-test-work\working_copies\patch_tests-4\A\D\G\rho
> A svn-test-work\working_copies\patch_tests-4\A\D\G\tau
> A svn-test-work\working_copies\patch_tests-4\A\D\H
> A svn-test-work\working_copies\patch_tests-4\A\D\H\chi
> A svn-test-work\working_copies\patch_tests-4\A\D\H\omega
> A svn-test-work\working_copies\patch_tests-4\A\D\H\psi
> A svn-test-work\working_copies\patch_tests-4\iota
> Checked out revision 1.
> CMD: svn.exe patch
> "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-work\local_tmp\tmpbkppie"
> . --config-dir "C:\SVN\src-trunk\Release\subversion\tests\cmdline\svn-test-
> work\local_tmp\config" --password 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
> p a t c h " 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 \ t m p b k p p i 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.078000>
> C A\B\E\alpha
> svn: Can't open file '\A\B\lambda': The system cannot find the path specified.
> UNEXPECTED STDERR:
> svn: Can't open file '\A\B\lambda': The system cannot find the path specified.
> EXCEPTION: SVNUnexpectedStderr
> Traceback (most recent call last):
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 1138, in run
> rc = self.pred.run(sandbox)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\testcase.py",
> line 114, in run
> return self.func(sandbox)
> File "C:\SVN\src-trunk\Release\subversion\tests\cmdline\patch_tests.py",
> line 425, in patch_unidiff_absolute_paths
> 0) # dry-run
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\actions.py",
> line 983, in run_and_verify_patch
> raise verify.SVNUnexpectedStderr
> SVNUnexpectedStderr
> FAIL: patch_tests.py 4: apply a unidiff patch containing absolute paths
> Traceback (most recent call last):
> File "C:\SVN\src-trunk\Release\subversion\tests\cmdline\patch_tests.py",
> line 439, in <module>
> svntest.main.run_tests(test_list)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 1526, in run_tests
> safe_rmtree(temp_dir, 1)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 650, in safe_rmtree
> rmtree(dirname)
> File "C:\SVN\src-trunk\subversion\tests\cmdline\svntest\main.py",
> line 637, in rmtree
> shutil.rmtree(dirname)
> File "C:\Python26\lib\shutil.py", line 221, in rmtree
> onerror(os.remove, fullname, sys.exc_info())
> File "C:\Python26\lib\shutil.py", line 219, in rmtree
> os.remove(fullname)
> WindowsError: [Error 32] The process cannot access the file because it
> is being used by another process:
> 'svn-test-work\\local_tmp\\tmpbkppie'
>
> The problem here is that
> patch.c:resolve_target_path(target_path='/A/B/lambda') calls
> svn_dirent_is_absolute(target_path='/A/B/lambda') but
> target_path='/A/B/lambda' *DOES NOT* consider
> 'target_path='/A/B/lambda' absolute for reasons I don't completely
> follow (see r36310 which made this change).
>
> Paul
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1774756
Received on 2009-04-17 22:53:01 CEST