2

I am currently doing a migration for a company's website and they happen to use subversion on a red hat server. I exported the file to a TAR file so I could transfer it to a Windows environment. I need to remove all the hidden .svn folders that are in this instance of the export.

Would a simple Windows search for the .svn folders suffice or would I be missing something in this process?

Cipher
  • 91
  • 1
  • 6
  • Something to note, if you upgrade to a SVN 1.7 client then there will only be one .svn in the base folder and you could simply delete that one folder, this might make it simpler for future deployments. – Kevin Green Mar 29 '12 at 18:33
  • You should accept an answer or clarify your concerns if they did not resolve your issues. – MrTJ Apr 03 '12 at 14:14

5 Answers5

4

If you have an access to the SVN repository, use svn export command next time. it will export all files without things that svn use internally to track changes. If it is too late, i believe just deleting .svn folders (which are hidden by default) should be enough.

tigrou
  • 4,236
  • 5
  • 33
  • 59
  • Thanks for all the responses. I'll remember to use the export function next time so that it will remove all .svn folders. Since the Windows search worked I won't change it up but after seeing the amount of space that the .svn folders took up, the export function is definitely the way to go before transporting it. – Cipher Mar 29 '12 at 14:17
2

SVN export is what you need. Open the SVN client your using (your IDE for instance). In the NetBeans for instance you can find export in the menu Team -> Export... (when you're already connected to the repository). If for some reason you do not have access to the repository, you may use tools like SVNcleaner to remove the hidden .svn folders.

venci
  • 21
  • 2
2

It would work, I do that all the time.

Probably you need to allow to view hidden files beforehand, in case you can not see them in Windows explorer.

Marcel
  • 15,039
  • 20
  • 92
  • 150
1

If you still have access to the Red Hat server, I would first make a copy of the project's folder and remove the SVN folders there, before compressing and moving to Windows machine.

This command could be used to remove the foders:

$ rm -rf `find . -type d -name .svn`
Christian
  • 1,258
  • 10
  • 11
  • See [link](http://stackoverflow.com/questions/4889619/command-to-recursively-remove-all-svn-directories-on-windows) – Christian Mar 29 '12 at 13:38
1

If you can't use svn export (for example because the files are already there and you can't access to the repo) from command line under windows you can:

FOR /r "%1" %%f IN (.svn) DO RD /s /q "%%f"
MrTJ
  • 13,064
  • 4
  • 41
  • 63