I'm pulling my hair out on this one.
I have a site which is version controlled using Subversion. I use aptana (eclipse, subclipse) to do the svn. I have been checking in and out files, updating etc and everything is fine. However the system we have been building has been adding its own files and folders.
When I try to commit these, it tells me <path>
is not a working copy. If I try to do a cleanup then it gives the same error. I found I can manually add each file to version control but this throws the same error. Doing an update doesn't help, refreshing the workspace does not do anything either. Cleanup seems to die after the error and then the directory is locked.
I know you're supposed to add files using SVN, but how on earth do you work with generated files? How do I get around this "<folder>
is not a working copy directory" error? How do I get Subversion to just look at the files and add them to its repository?
A Subversion working copy is your own private working area, which looks like any other ordinary directory on your system. It contains a COPY of those files which you will have been editing on the website. You can edit these files however you wish, in the usual way.
You can use the svn command line utility svn info from the working copy root directory. It will tell you revision, repository url and much more.
The easiest way to copy files and folders from within a working copy is to use the right drag menu. When you right drag a file or folder from one working copy to another, or even within the same folder, a context menu appears when you release the mouse.
We had this problem today when I tried to add a folder "A" in which I didn't have write permission (so it couldn't create the A/.svn folder).
Running svn status gave me a "~" next to folder A. Running svn cleanup said that parent of A was locked.
What ended up working was:
cp -r A A~ # backup, since A was not in the repo rm -rf A # removed locked directory svn rm A # remove A from pending commit mv ~A A # restore backup svn add A # re-add to pending commit svn cleanup # (had to cleanup several parent folders higher as well)
If you want the generated files to be added to SVN, use svn add
to recursively add them - this will make sure that all directories are part of the working copy, and all files and directories are added to SVN, and will be committed as part of the next svn commit
.
However, often generated files and folders should not be added to SVN, since they are generated from the source files as part of a build. In this case, you should mark the with svn:ignore so that they are not part of the working copy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With