将 PHP 类(Zend、PEAR)保留在 Subversion 中?
我在同一个 Subversion 存储库中有两个项目。他们都使用一些标准代码/类(Zend/PEAR/phpMyAdmin 等)来处理各种事情。存储库的组织方式如下:
\shared\trunk
- 两个项目使用的内容\main\project1\trunk\shared
svn:external of\shared\trunk
\main\project2\trunk\shared
svn:external of\shared\trunk
这非常有效,我只需要更新中的公共代码一 地点。我也确信它可以在本地、演示和生产环境中工作。
然而,我注意到 TortoiseSVN 似乎每次都会花一些时间检查所有三个目录。现在我有了一些标签和分支,它甚至更慢。类文件夹包含约 3500 个文件和 1500 个文件夹。
该怎么办?控制标准类版本是一个好的做法吗?
可能的替代方案:删除外部文件,而让 Phing 处理导出类文件夹?
I have two projects in the same Subversion repository. They both use some standard code/classes (Zend/PEAR/phpMyAdmin etc) for various things. The repo is organized like this:
\shared\trunk
- stuff used by both projects\main\project1\trunk\shared
svn:external of\shared\trunk
\main\project2\trunk\shared
svn:external of\shared\trunk
This works great in the way that I only need to update the common code in one location. I am also sure it will work in both local, demo and production environments.
However, I notice that TortoiseSVN always seem to use some time checking out all there three directories everytime. And now that I have some tags and branches, it is even slower. The classes folder consists of about 3500 files and 1500 folders.
What to do? Is it good practice to keep standard classes version controlled?
Possible alternative: Drop the externals, and instead let Phing deal with exporting the classes folders?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
svn:external
保留对依赖代码的引用是一种常见(实际上也是好的)做法。为了获得这种便利,在 svn up 上等待一段时间确实值得。
It is a common (and good actually) practice to keep references to dependent code with
svn:external
.It really worth to wait for some time on
svn up
s for getting this convenience.