"马克" svn导出与修订 [英] "Mark" svn export with revision

查看:192
本文介绍了"马克" svn导出与修订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找以下情况的解决方案。

I'm looking for a solution for the following situation.

我们使用Subversion,除了开发环境之外,我们使用了checkouts,我们有一个测试环境,应尽可能接近于生产环境。

We're using Subversion, and besides the development enviroment, where we use checkouts, we have a test environment, which is supposed to resemble the production environment as closely as possible.

因此,我们现在已经设置好了,以便通过使用svn导出来更新环境。但是,由于我们只想要最新版本,所以我们不知道导出了哪些版本。

Therefore, we now have it set up so that the environment is updated by using svn export. However, since we just want the latest revision, we don't know what revision has been exported.

我的问题是,有没有办法标记这个导出,例如添加一些生成的文件,表示哪个版本被导出? (我们不想导出标签,因为我们将在一个发布周期内更新多次。)

My question is, is there some way to "mark" this export, for example by adding some generated file, that indicates which revision was exported? (We don't want to export tags, as we will be updating several times within one release cycle.)

我希望有人可以帮助我。谢谢!

I hope someone can help me. Thanks!

推荐答案

您可以做的一件事是确保您从已知的修订版中导出,并将修订号写入导出中的文本文件。 svnversion 命令将告诉您工作目录的修订版本号。所以做一个 svn update 可以获得最新版本,然后将 svn export 添加到您的部署位置,然后 svnversion 将输出重定向到与导出相同的文本文件。修订版本将是更新的修订版本,即使有人自那以后提交了新的代码。

One thing you could do is make sure you're exporting from a known revision, and write that revision number to a text file in the export. The svnversion command will tell you the revision number of a working directory. So do an svn update to get the latest version, then svn export to your deployment location, then svnversion redirecting the output to a text file in the same place as the export. The revision number will be the revision as of the update, even if somebody has committed new code since then.

您当然希望在shell中自动执行上述过程脚本或东西。

You will of course want to automate the above process in a shell script or something.

这篇关于"马克" svn导出与修订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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