发布我的ASP.NET站点会破坏Subversion文件

时间:2021-03-09 04:02:22

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

我一直在尝试使用SVN将我的asp.net网站部署到生产环境。我的工作流程是:

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

设置:将站点发布到FolderX,将FolderX导入SVN,使用FolderX的存储库更新Web服务器生产文件夹。

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

每天:将更新的站点发布到FolderX,提交更改,更新远程服务器。

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.

这就是理论,但是当我再次将网站发布到FolderX时,它会销毁所有网站子文件夹中的.svn文件夹。

How can prevent that from happening?

如何防止这种情况发生?

2 个解决方案

#1


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.

首先,如果网站中的.svn文件夹被破坏,为什么重要?你肯定没有从生产环境回到SVN吗?我怀疑你遇到的问题是后来的更新。您可以通过在更新之前删除整个站点来解决该特定问题。

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.

其次,为什么要尝试使用SVN进行部署?这并不是它的真正含义,只需5行批处理代码就可以将整个树部署到生产地点。

#2


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

如果您正在使用tortoisesvn,请在设置中单击“使用_svn而不是.svn目录”。

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

然后发布希望不会忽略.svn目录。

#1


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.

首先,如果网站中的.svn文件夹被破坏,为什么重要?你肯定没有从生产环境回到SVN吗?我怀疑你遇到的问题是后来的更新。您可以通过在更新之前删除整个站点来解决该特定问题。

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.

其次,为什么要尝试使用SVN进行部署?这并不是它的真正含义,只需5行批处理代码就可以将整个树部署到生产地点。

#2


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

如果您正在使用tortoisesvn,请在设置中单击“使用_svn而不是.svn目录”。

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

然后发布希望不会忽略.svn目录。