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

[PATCH] Fix Win32 JavaHL Failures

From: Paul Burba <pburba_at_collab.net>
Date: 2007-04-12 05:30:56 CEST

Of the two JavaHL errors I've been seeing the last few days on Windows,
testCopy and testMergeInfoRetrieval...

1)
testCopy(org.tigris.subversion.javahl.tests.BasicTests)org.tigris.subver
sion.javahl.ClientException: Path is not a working copy directory
svn: '.' is not a working copy
The system cannot find the path specified.
svn: Can't open file '.svn\entries': The system cannot find the path
specified.
 
        at org.tigris.subversion.javahl.SVNClient.copy(Native Method)
        at
org.tigris.subversion.javahl.SVNClientSynchronized.copy(SVNClientSynchro
nized.java:732)
        at
org.tigris.subversion.javahl.tests.BasicTests.testCopy(BasicTests.java:7
66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at
org.tigris.subversion.javahl.tests.RunTests.main(RunTests.java:56)
2)
testMergeInfoRetrieval(org.tigris.subversion.javahl.tests.BasicTests)org
.tigris.subversion.javahl.ClientException: Path is not a working copy
directory
svn: '.' is not a working copy
The system cannot find the path specified.
svn: Can't open file '.svn\entries': The system cannot find the path
specified.
 
        at org.tigris.subversion.javahl.SVNClient.getMergeInfo(Native
Method)
        at
org.tigris.subversion.javahl.SVNClientSynchronized.getMergeInfo(SVNClien
tSynchronized.java:1159)
        at
org.tigris.subversion.javahl.tests.BasicTests.acquireMergeInfoAndAssertE
quals(BasicTests.java:2022)
        at
org.tigris.subversion.javahl.tests.BasicTests.testMergeInfoRetrieval(Bas
icTests.java:2000)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at
org.tigris.subversion.javahl.tests.RunTests.main(RunTests.java:56)

...I've at least found the problem with testCopy(). In r22986 (the
addition of JavaHL support for the svn_client_copy_source_t parameter of
the new svn_client_copy4() API) SVNClient::copy stopped using the
Targets class as an argument for copy source and started using the new
CopySources class. Problem is that Targets used JNIUtil::preprocessPath
to canonicalize the copy source before it found it's way to
libsvn_client, but CopySources does nothing equivalent and on Windows
this leads to local-style backslash paths ending up in libsvn_client and
wreaking the expected mayhem.

This patch fixes the problem, but I'd appreciate someone more familiar
with the bindings taking a look, see if what I'm doing regarding the
error handling looks correct.

Thanks,

Paul B.

[[[
Fix JavaHL testCopy() failure on Win32.

* subversion/bindings/javahl/native/CopySources.cpp
  (CopySources): Initialize m_error_occured.
  (array): Use JNIUtil::preprocessPath on copy sources to ensure
  paths are canonical before they get into libsvn_client code.
  (error_occured): New method definition.

* subversion/bindings/javahl/native/CopySources.h
  (error_occured): New public method declaration.
  (m_error_occured): New private member.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Apr 12 05:31:42 2007

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.