views:

325

answers:

3

I've been trying to use SVN to deploy my asp.net site to production. My workflow is:

Setup: Publish Site to FolderX, Import FolderX to SVN, Update web server production folder with the repository for FolderX.

Everyday: Publish updated site to FolderX, Commit Changes, Update remote server with changes.

That's the theory, but when I publish the site again to FolderX, it destroys the .svn folders that are inside all the site subfolders.

How can prevent that from happening?

+1  A: 

Well, a couple of things:

First, why does it matter if the .svn folders within the website are ruined? Surely you're not committing FROM your production environment back into SVN? I suspect the problem you're having is later updates. You can solve that particular problem by deleting the entire site before you update into it.

Second, why are you trying to use SVN for deployment? That's not really what it's for, and all it would take is about 5 lines of batch code to deploy your entire tree to the production location.

DannySmurf
1) Tt matters because without the .svn folders, I can't commit from my local. All the subfolders are listed as "Obstructed." So if I can't commit, I can't update the remote server.2)I don't know how to write a batch that transfers a published site from local to a remote server. VPN+drive mapping?
Pete Michaud
Well, you'd use the VPN if the remote server is on a different network than you. Once you're connected to the same network (whatever the method), you can just copy it over using the UNC path (eg. \\server\somepath)
DannySmurf
Alright, but you haven't answered the question. SVN allows me to update the site piecemeal instead of transferring whole 200megs, and it allows me to easily roll back to a previous version. Batch files can't do that. I know there are people using this method, I'd just like to know how they do it.
Pete Michaud
Well, if you know there are people using that method, you should be asking them directly. I don't know if you'll get an answer here; I honestly can't imagine anyone actually doing something like this, if only because of the security considerations.
DannySmurf
A: 

If you're using tortoisesvn, then click 'use _svn instead of .svn directories' in the settings.

Then the publish hopefully won't ignore the .svn directories.

BenB
A: 

was there ever any resolution for this? This issue also prevents me from commiting the "published" files to source control without having to do extra work/scripting. The problem with the ASP.NET publish is it wipes everything in the publication folder including temporary folders.

john