Here’s my code that gets the SVNCommitPacket:

    SVNCommitPacket commitPacket
      = svnCommitClient.doCollectCommitItems
          (paths,
           false,              // keepLocks
           false,              // If true, then force a non-recursive commit.
           SVNDepth.INFINITY,  // When committing a folder, commit all of its 
contents.
           null);

I am currently trying to convert over to using the new wc2 api for my commit. 
Can I mix and match the 2 APIs, or does the whole program need to be converted?

Thanks, and let me know if you need more information,

    Andy

From: svnkit-users-boun...@svnkit.com [mailto:svnkit-users-boun...@svnkit.com] 
On Behalf Of Alexander Kitaev
Sent: Monday, March 11, 2013 11:20 AM
To: SVNKit Library Users List
Subject: Re: ClassCastException when committing

Hello Andy,

I'm investigating this problem and get a question for you: how did you get 
SVNCommitPacket objects that you pass to the SVNCommitClient.doCommit(...) 
method? So far, SVNCommitPacket obtained with doCollectionCommitItems methods 
should not cause an exception.

As Dmitry already wrote you, wc2 provides new API that you may find more 
convenient than the older SVNClientManager-based one. In 1.7.x versions of 
SVNKit old API is implemented on top of the new SvnOperation-based one.

Thanks!

Alexander Kitaev,
TMate Software,
http://subgit.com/ - Svn to Git Migration!
http://svnkit.com/ - Java [Sub]Versioning Library!
http://hg4j.com/ - Java Mercurial Library!
http://sqljet.com/ - Java SQLite Library!

On 9 March 2013 01:25, Andy Cohen <aco...@iii.com<mailto:aco...@iii.com>> wrote:
I’ve recently upgraded to SVNkit 1.7.8, and I’m getting this error when I 
commit:

java.lang.ClassCastException: org.tmatesoft.svn.core.wc.SVNCommitPacket cannot 
be cast to 
org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec$SVNCommitPacketWrapper
        at 
org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:851)
        at 
org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:759)
        at 
org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:716)

Here’s my code that invokes SVNCommitClient.doCommit():

   SVNCommitInfo commitInfo
      = svnCommitClient.doCommit
          (commitPacket,
           false,  // keepLocks
           commitComment);

While poking around, trying to figure out how to solve this problem, I’ve 
noticed that there seems to be a parallel between org.tmatesoft.svn.core.wc and 
org.tmatesoft.svn.core.wc2. That is, the first package has something called an 
“SVNCommitClient”, while the second package has something called an 
“SvnCommit”. Should I be migrating my code from the “wc” stuff to the “wc2” 
stuff, or am I barking up the wrong tree?

Thanks for any help,

    Andy

Andy Cohen
Principal Software Engineer
Product Development
Innovative Interfaces, Inc.
5850 Shellmound Way
Emeryville, CA 94608

[letter-t]  510-655-6200 Ext 4221
[letter-e]  aco...@iii.com<mailto:aco...@iii.com>

[INNOIcon]<http://www.iii.com/>     [TwritterIcon] 
<https://twitter.com/iii_Innovative>      [FacebookIcon] 
<https://www.facebook.com/InnovativeInterfaces>


<<inline: image001.jpg>>

<<inline: image002.jpg>>

<<inline: image003.jpg>>

<<inline: image004.jpg>>

<<inline: image005.jpg>>

Reply via email to