SVN结帐或出口生产环境? [英] SVN checkout or export for production environment?

查看:83
本文介绍了SVN结帐或出口生产环境?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在开展的一个项目中,我们在开发团队之间进行了持续的讨论 - 生产环境是否应该从SVN存储库或出口部署为结帐?

In a project I am working on, we have an ongoing discussion amongst the dev team - should the production environment be deployed as a checkout from the SVN repository or as an export?

开发环境显然是一个结帐,因为它不断更新。
对于生产,我个人用于检出主干,因为它使未来的更新更容易(只需运行svn更新)。然而,一些开发人员是反对的,因为svn创建具有svn进程的组/所有者和权限的文件(这是在linux操作系统上,所以这些事情很重要),并且还有生产中的.svn目录似乎他们有点脏。

The development environment is obviously a checkout, since it is constantly updated. For the production, I'm personally for checking out the main trunk, since it makes future updates easier (just run svn update). However some of the devs are against it, as svn creates files with the group/owner and permissions of the svn process (this is on a linux OS, so those things matter), and also having the .svn directories on the production seem to them to be somewhat dirty.

此外,如果它是一个结帐 - 如何将个性化功能推送到生产而不包括开发中的代码?您是否使用标签或分支出每个功能?任何替代方案?

Also, if it is a checkout - how do you push individual features to the production without including in-development code? do you use tags or branch out for each feature? any alternatives?

编辑:我可能还不清楚,其中一个要求是能够不断地将修补程序生产环境。我们希望避免一个完整的构建(比简单的更新需要更长的时间),只是为了推动关键的修复。

I might not have been clear - one of the requirement is to be able to constantly be able to push fixes to the production environment. We want to avoid a complete build (which takes much longer than a simple update) just for pushing critical fixes.

推荐答案

Subversion常见问题似乎主张部署为结帐,自动更新后提交钩脚本。他们通过在httpd.conf中添加以下内容阻止Apache导出.svn文件夹(可能是一个好主意):

The Subversion FAQ seems to advocate deployment as a checkout, autoupdated with post-commit hook scripts. They prevent Apache from exporting .svn folders (probably a good idea) by adding the following in httpd.conf:

# Disallow browsing of Subversion working copy administrative dirs.
<DirectoryMatch "^/.*/\.svn/">
    Order deny,allow
    Deny from all
</DirectoryMatch>

我对我自己非常新,但也许你可以在创建一个钩子脚本时触发一个钩子脚本新标签这样,当您准备好更新实时网站时,您只需将上次更改提交到中继线,创建新标签,脚本将使用svn更新更新您的实时站点。

I'm extremely new to svn myself, but maybe you could trigger a hook script when you create a new tag. That way, when you're ready to update the live site, you just commit your last changes to the trunk, create the new tag, and the script updates your live site with svn update.

这篇关于SVN结帐或出口生产环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆