您将如何为内部软件项目组织 Subversion 存储库? [英] How would you organize a Subversion repository for in house software projects?

查看:26
本文介绍了您将如何为内部软件项目组织 Subversion 存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一家主要业务与软件无关的公司工作.大多数使用源代码控制的文档都是为商业或开源项目编写的开发团队编写的.作为编写内部软件的人,我可以说工作的完成方式与商业或开源环境中的工作方式不同.此外还有需要与代码保持同步的存储过程和数据库脚本.

I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or open source setting. In addition there are stored procedures and database scripts that need to be kept in sync with the code.

我特别希望获得有关如何最好地使用内部软件构建存储库的建议.大多数文档都建议使用主干、分支、标签等.以及使生产、测试​​和开发环境与存储库中的相应部分保持同步的程序.

In particular I am looking to get suggestions on how best to structure the repository with in house software in mind. Most documentation suggests trunk, branches, tags etc. And procedures for keeping production, test and development environments in sync with their respective sections in the repository etc.

推荐答案

设置 SVN 存储库仅在您组织它们的方式方面可能很棘手.在我们设置 SVN 之前,我实际上是 RTFM 的在线Subversion 手册,其中讨论了存储库的组织技术和您应该提前考虑的一些问题,即如果您决定改变主意,在创建存储库后不能做的事情.我建议在设置前先阅读本手册.

Setting up SVN repositories can be tricky only in the sense of how you organize them. Before we setup SVN, I actually RTFM'd the online Subversion manual which discusses organizational techniques for repositories and some of the gotchas you should think about in advance, namely what you cannot do after you have created your repositories if you decide to change your mind. I suggest a pass through this manual before setup.

对我们而言,作为顾问,我们通过 SVN 进行定制和内部软件开发以及一些文档管理.为每个客户创建一个存储库,为我们自己创建一个存储库符合我们的利益.在每个存储库中,我们为每个项目(软件或其他)创建了文件夹.这使我们能够按存储库和客户端甚至存储库中的项目来划分安全访问.更深入地讲,我们为每个软件项目创建了working"、tags"和branches"文件夹.我们通常将发布放在标签"中,使用release_w.x.y.z"作为标准的标签.

For us, as consultants, we do custom and in-house software development as well as some document management through SVN. It was in our interest to create one repository for each client and one for ourselves. Within each repository, we created folders for each project (software or otherwise). This allowed us to segment security access by repository and by client and even by project within a repository. Going deeper, for each software project we created 'working', 'tags' and 'branches' folders. We generally put releases in 'tags' using 'release_w.x.y.z' as the tag for a standard.

在您的情况下,为了使 sproc、脚本和其他相关文档保持同步,您可以创建一个项目文件夹,然后在该文件夹下创建一个工作"文件夹,然后在该代码"下和旁边的脚本",等等.然后,当您标记要发布的工作版本时,您最终会将它们全部标记在一起.

In your case, to keep sprocs, scripts, and other related documents in synch, you can create a project folder, then under that a 'working' folder, then under that 'code' and next to it 'scripts', etc. Then when you tag the working version for release, you end up tagging it all together.

\Repository
   \ProjectX
      \Working
         \Code       
         \Scripts
         \Notes       
      \Tags
      \Branches

至于非代码,我建议按项目或文档类型(手册、政策等)进行直接文件夹布局.通常有文档,具体取决于您公司的运营方式,只需拥有版本历史记录/日志就足够了.

As for non-code, I would suggest a straight folder layout by project or document type (manuals, policies, etc.). Generally with documents and depending on how your company operates, just having the version history/logs is enough.

我们在 Windows 上运行 SVN 以及 WebSVN,后者是一款出色的开源存储库查看器.我们使用它来让客户通过网络访问他们的代码,这一切都由底层的 Subversion 安全驱动.在内部,我们使用 TortoiseSVN 来管理存储库、提交、更新、导入等.

We run SVN on Windows along with WebSVN which is a great open source repository viewer. We use it to give clients web access to their code and it's all driven by the underlying Subversion security. Internally, we use TortoiseSVN to manage the repositories, commit, update, import, etc.

另一件事是,应将培训视为部署中不可或缺的一部分.不熟悉版本控制的用户可能很难理解发生了什么.我们发现向他们提供功能说明(在创建项目时执行此操作,在更新时执行此操作等)对他们学习概念非常有帮助.我们创建了一个沙盒"存储库,用户可以在其中随意使用文档和文件夹进行练习,您可能会发现这对于尝试建立哪些策略也很有用.

Another thing is that training should be considered an integral part of your deployment. Users new to version control may have a hard time understanding what is going on. We found that giving them functional instructions (do this when creating a project, do this when updating, etc.) was very helpful while they learned the concepts. We created a 'sandbox' repository where users can play all they want with documents and folders to practice, you may find this useful as well to experiment on what policies to establish.

祝你好运!

这篇关于您将如何为内部软件项目组织 Subversion 存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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