Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcopy ASP.NET deployment of a Subversion-managed project

Tags:

asp.net

svn

I'm currently using Subversion to manage my ASP.NET website. I'm finding that whenever I go to upload my website to my server, I'm copying a large number of hidden .svn folders and whatever contents may lie within them.

Does anyone have any suggestions for avoiding this? I don't particularly want those hidden .svn folders on the production server, but short of manually deleting each .svn folder before I upload my website, I'm at a loss for how to have a .svn-folder-free production environment.


Edit: Thank you everyone, those are great suggestions, I really appreciate it!

like image 898
Rob Avatar asked Dec 23 '22 14:12

Rob


2 Answers

  1. You should use export command of the subversion.
  2. You may tweak registry and add a "Delete SVN Folders" to the context menu for folders. Here is an example script from http://weblogs.asp.net/jgalloway/archive/2007/02/24/shell-command-remove-svn-folders.aspx Save it to a .reg file and execute.

Right click on your project folder and delete all .svn folders recursively.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@="Delete SVN Folders"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""
like image 93
Cihan Ucar Avatar answered Jan 05 '23 19:01

Cihan Ucar


two suggestions:

  • Use robocopy or xcopy to filter out the .svn folders
  • svn export the repository to the webserver (docs). Exporting will not write any .svn folders

see also: Tortoise SVN hidden SVN folders

like image 24
craigb Avatar answered Jan 05 '23 20:01

craigb