#SVN solved error “is not a working copy directory”

I get this svn error quite often since changing my development environment to ubuntu, because I never got this error while I working on windows. This error was really sucks before I got the solution. Everytime I commit my works this error occurs. Then, why the directory is known as not working copy? In linux there are file and directory permissions where both of them can be different. So far, I see that the file permission is the cause of this error.

I previously used very bad solution to deal with this error. I copied the project directory, delete the repository and export again the backup to the repository. It would be very bad idea to do this every time I get the error. So this is what I got after the tiring searching.

For instance, I have a directory works/ that is known as “not a working copy”. To resolve the error then do these steps:

  1. Make sure that the directory permission is correct (same with another working directory). Use chown command to take the ownership or chmod to change the permission. Don’t forget to use -R option to apply the changes to the whole directory.
  2. Rename the directory.
    mv works/ works_/

    (it can be any name).

  3. Revert the svn.
    svn revert works/
  4. Clean up the working directory.
    svn cleanup
  5. Rename again the directory to the original name.
    mv works_/ works/
  6. Add the directory to svn.
    svn add works/
  7. Clean up once again.
  8. Finally commit the changes.
    svn commit works/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s