0

I use SVNKIT checkout a folder .svn information use this

    if (!SVNUtil.isWorkingCopy(ws)) {
      updateClient.checkout(clientManager, repositoryURL, SVNRevision.HEAD,ws,SVNDepth.EMPTY);
    }

then I use IO stream create a new file with the same filename in this SVN;then I try "commitClient.doCommit" to commit it but faild,the faild information is "the file is not working copy". How can I do this correctly?

2 Answers2

0

if a file is commited it must be in the working copy.I came across this problem several days age.You can delete the file in SVN then do import.If the file was commited is a txt file,you can do file mofidication,there is a example at: http://wiki.svnkit.com/Committing_To_A_Repository

0

If I understood correctly you are performing bellow steps: 1. Checkout a file (file name a.java) 2. Using IO stream you create a new file of same name as previous(a.java) 3. You trying to commit the file - and you getting "the file is not working copy" error.

The problem is in step #2 When you creating a new file(a.java) it is creating in default project path. However, the file path needs to be the same path(as in SVN which you pulled using step #1).

As I mentioned above(Step #2) the file is created in default project structure, the .svn does not have any clue about this new file and throwing the error "the file is not working copy"

Note: At first you have to add new file in SVN and then you could commit it to repository. SO its a two step process.