Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obstructed folders in Subversion

Tags:

svn

People also ask

How do I clean up a .svn folder?

According to this answer and SVN change log, svn cleanup has an option to vacuum pristine copies ( /vacuum ). This is done by default starting from 1.8. From version 1.10 up it is not longer done by default, but can be run using the command svn cleanup --vacuum-pristines (see this answer).

What does .svn folder contain?

svn folder, the . svn folder contains a folder titled pristine which contains copies of your current project. I have no use for these copies which take up a ton of space, and reducing the size of my project will also reduce the time it takes to compile.

Can I delete .svn folder?

There is only one . svn folder, located in the base of the working copy. If you are using 1.7, then just deleting the . svn folder and its contents is an easy solution (regardless of using TortoiseSVN or command line tools).

Can I move svn folder to another location?

Moving files and folders select the files or directories you want to move. right drag them to the new location inside the working copy. release the right mouse button. in the popup menu select Context Menu → SVN Move versioned files here.


it occurs when you have deleted or moved the .svn subdirectories (without going through SVN commands), so SVN has a corrupted view of the working copy.

Try a cleanup first, and if that doesn't solve it, revert (or update) the directory to restore the subdirectory .svn folders.


Without knowing what causes this, the solution can be to export the working copy (the entire checkout you have locally) to somewhere else.

If you are using tortoisesvn, you get the option to "export un-versioned files", but I think if doing it from the command line it only exports versioned files so you might have a bit of a laborious task copying un-versioned files manually.

Once done, check out a clean working copy and then drop the exported backup you have over the top of it. It's very important that the backup has no .svn folders in it.

I've seen these errors before when people have checked out working copies inside other working copies or anything else that corrupts the .svn entries.


Had the same issue and fixed it like this:

  • renamed the obstructed dir
  • created the dir with its original name in SVN (e.g. svn mkdir)
  • updated the parent folder, so the newly created dir appears in my working copy
  • copied the files from the obstructed to the newly created dir and commited them

If you're on a *nix system, ensure that you didn't create a file, add it to SVN, then delete it, replacing it with a folder of the same name. Doesn't help OP, but hopefully it'll save someone a bunch of stress.


This means that, for some reason, a conflict has occurred during the operation. Check to see if there is an existing unversioned file or folder with the same name as a versioned one.

(Paraphrased from the Tortoise SVN client help file)


Nothing worked for me so i've done the following:

  • exported with the unversioned files in a new location
  • renamed the existing folder
  • moved the folder from the export location in the project
  • renamed the new folder
  • add, commit
  • removed the old, renamed folder
  • renamed the new folder
  • commit

There are different variations of scenario that can cause this situation. Here is one example:

I ended up with the ! mark on a directory which was renamed from www to www_a without using 'svn rename' command:

  1. Rename the current directory that bears the original name, for example to www_b
  2. Rename www_a back to www
  3. Make sure you do 'svn update' or 'svn revert' inside the www directory
  4. Delete the up-to-date www directory without using 'svn delete'
  5. Go to the parent directory and issue 'svn update'
  6. This will restore the original www directory
  7. This time use 'svn rename' to rename www to www_a
  8. Rename www_b back to www
  9. Use 'svn add' to add it into the repository

You should get a correct svn work directory at this point. And learn a thing or two on how to resolve svn directory confusion.