Question

Kind of a newbie question, but I am having problems using SNVKit.

I am using SVNKit in an application to commit changes to files. I have it successfully adding the files and folders to the working copy, but I am having problems committing it to the respository.

The command I am trying to run is 'commit -m "Test Add" /svnroot/project1/' but I keep getting "svn: '/home/user' is not a working copy"

I have a structure similar to this:

  • /svnroot/
  • /svnroot/project1/
  • /svnroot/project1/grouping1/
  • /svnroot/project1/grouping1/myfilesarehere

If I try to commit the file, I get the following message: "'/svnroot/project1/grouping1' is not under version control and is not part of the commit, yet its child is part of the commit."

What might I be doing wrong?

EDIT: Fixed the directories.

Was it helpful?

Solution 7

I have it tracked down to a possible bug somewhere. If I don't add a message it works. Time for more digging. Thanks for the pointers.

OTHER TIPS

If you have both a directory and its child added, but neither is not committed, I believe you get this message if you try to commit just the child. You need to commit the parent directory first.

I got this message and I noticed that I was doing a commit while I was in the sub-directory. When I switched to the root of the tree, it commited w/o issue.

move your -m "comment" to the end. I would just change directory into your project directory. Then you just type svn commit -m "comment" and svn does the rest.

I think the problem is that you are committing changes to the actual SVN repository itself instead of doing an import, checking out a copy for yourself, making changes, and then doing a commit from your checked-out working copy after adding any subdirectories. So: import, checkout, make changes, and then finally do an add for each new file or directory and commit -m "message" form the top level.

More information in the free online SVN "turtle" book.

It's not entirely clear because you've inconsistently replaced them, but it looks like you're getting repository paths/URLs confused with working copy paths. If you're adding or committing files, always use the working copy paths. Try playing around with the command-line svn before trying to use SVNKit.

If you want to commit an entire new directory consider using svn import instead. As it stands right now you may have to revert or some other action clean up the current mess.

Some times, using some Softwares such as eclipse or Versions.app produces this errors. In this case, quit the SVN client and do it on command line.

You have probably done some refactoring and you are trying to commit 'some.package.YourClass.java', in that case try commiting the directory(package) 'some'.

If you want to save yourself from such headache in the future consider switching to GIT instead of svn. Remember svn keeps your changes in a .svn file and tries to puch it to the repository. When you commit it will according to this .svn file push 'your changes'. But what if yo're changes are very complex? svn can't handle it.

GIT on the other hand: you retrieve all updates so your project is up-to-date. And when committing it just overwrites the repo, since it knows yours is most recent and no hustle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top