SVN - 如何处理一个项目,两种版本,唯一的区别是一个项目有几个附加文件

发布于 2024-08-19 09:15:05 字数 209 浏览 2 评论 0原文

我认为一种方法是保留一个代码库,导出时,根据发布要求手动添加或不添加这些附加文件。但它要求您记住每次导出副本时都执行此操作,这很容易忘记。

我在 SVN 中为项目创建了一个分支,其中包含这些文件,但问题是每次我更改主干时,我都需要在分支中再次执行此操作,或者合并。如何在不需要维护两个代码库的情况下获得所需的版本?或者有没有办法自动同步两个项目(主干,分支)的指定部分文件?有什么建议吗?

I think one method is keep one code base, when export, manually add or not add these additional files per release requirement. But it require you to remember doing this each time export a copy, which is easy to forget.

I created a branch for the project in SVN with these files included, but problem is each time i change the trunk, i need to do it again in the branch, or a merge. How can i get desired release without needs to maintain two code base? Or is there a way to auto sync specified part files of two projects (trunk,branch)? Any suggestion?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝天白云 2024-08-26 09:15:06

我只是将所有文件保存在一个分支中,并告诉我的发布机制应该包含哪些文件。如果不知道你的发布过程是如何运作的,就很难说更多......

I would just keep all the files in a single branch, and tell my release mechanism which files should be included. Without knowing how your release process works, it's hard to say more...

与之呼应 2024-08-26 09:15:06

采用单一分支/主干模型肯定会在关键时刻导致痛苦和误解。尽管很痛苦,但您需要有两个分支...或者可能通过 svn:externals 将差异设置为单独的项目。这样您就可以确保获得您想要的版本,仅此而已。

一个好的构建过程在这里会很有用。在 web2project 中,我们使用了一个相当强大的 Phing* 脚本 - 详细信息如下: http:// /caseysoftware.com/blog/the-joel-test-redux-web2project - 根据需要处理从标签或我们的主干中的拉取。好处是我们只运行一个命令(然后指定一个版本)来生成一个新的包来发布。

  • Phing 只是 PHP 世界的 Ant。概念相同并且语法非常相似。

Going with a single branch/trunk model is sure to lead to pain and misunderstandings at crucial times. As painful as it is, you need to have two branches... or possibly set up the differences as a separate project via svn:externals. That way you can be sure to get exactly the version you want and nothing more.

A good build process would be useful here. Within web2project, we use a pretty robust Phing* script - detailed here: http://caseysoftware.com/blog/the-joel-test-redux-web2project - to handle pulling from a tag or our trunk as necessary. The nice thing is that we run exactly one command (and then specify a version) to come up with a new package for release.

  • Phing is just Ant for the PHP world. The concepts are identical and the syntax is very similar.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文