tags:

views:

1819

answers:

5

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.

A: 

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.

J.J.
Moving the directory didn't work. Changing the directory is not an option that I know how to fix at this time. I'll look into that more.
Mike Wills
A: 

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.

Nicholas Riley
Take a look now.
Mike Wills
A: 

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.

Jonah Braun
+1  A: 

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.

Sean
No, this is the working copy. I previously did a checkout to this location.
Mike Wills
A: 

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.

Mike Wills
Ah, great! Hope you clear it up and get everything working.
Sean
@Mike_Willis Can you share with us the solution you found, as I'm having that very problem.
Riduidel