为 SVN 用户推荐的 Mercurial 存储库/文件夹结构
我正在尝试使用 Hg,以期摆脱 SVN,但想要一些关于如何构建我的 Hg 存储库的意见。我有 SVN 背景(这可能会影响我对其工作方式的看法!),我的存储库目前看起来像这样:
Project1
trunk
branches
1.0
1.1
Project2
trunk
等等。这似乎是构建 SVN 存储库的“传统”方式。
我应该如何用汞重现这个?为了让这一点变得有趣一点,我喜欢“稳定”、“qa”和“开发”存储库/文件夹的想法,如果可能的话,想介绍一下。
我是汞初学者,因此欢迎任何帮助或建议。
I am experimenting with Hg with a view to moving away from SVN but wanted some opinions on how I should structure my Hg repository. I come from a SVN background (which may of tainted my outlook on how this should work!) and my repository currently looks something like this:
Project1
trunk
branches
1.0
1.1
Project2
trunk
etc. This seems to be the 'traditional' way to structure an SVN repository.
How should I reproduce this with Hg? To spice this up a little I like the idea of 'stable', 'qa' and 'dev' repositories/folders and would like to introduce this if possible.
I am an Hg beginner so any help or advice is welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Subversion (SVN) 和 Mercurial (HG) 存储库(简称 repo)之间存在一些结构差异,这意味着您将如何“设计”层次结构:
trunk
/branches
/tags
结构可以帮助您找到“副本”,仅此而已。另一方面,分支和标签在 Mercurial 中定义良好。标签实际上是您为特定修订添加的名称,您可以请求所有现有标签。对于分支,您会看到有 很多处理它们的方法,但最适合 SVN 哲学的方法是命名分支。考虑到这一点,并将其与稳定、质量保证 (QA) 和开发 (dev) 流程的想法结合起来,我建议如下:
示例:MyProject-1.0
There are several structural differences between a Subversion (SVN) and Mercurial (HG) repository, or repo for short, implies how you'll "design" your hierarchy:
trunk
/branches
/tags
structure is there to help you to find your "copies" back, no more. On the other side, branches and tags are well defined in mercurial. A tag is really a name that you put on a particular revision, and you can ask for all the existing tags. For branches, you'll see that there are MANY ways to handle them, but the one that fits best to the SVN philosophy, are named branches.With that in mind, and coupling it with you idea of stable, quality assurance (QA), and development (dev) process, here is what I would recommend:
Example: MyProject-1.0
但在你这样做之前 - 看看这个:hginit.com - 阅读 ½ 小时,其中有一个部分svn-用户。
让我明智了很多,我决定放弃 /trunk /tag 结构,并以不同的方式使用 Mercurial。我现在为每个项目都有一个存储库,其中仅包含项目的结构,并使用 Mercurial tag 命令进行标记。
.杰斯帕·豪格
But before you do that - check this out: hginit.com - it's a ½ hour read, and it has a section for svn-users.
Made me a lot wiser, and I decided on abandoning /trunk /tag structure, and use mercurial in a different manner. I now have a repository for every project, that just contains the structure of the project, and i tag using the mercurial tag command.
.Jesper Hauge
Mercurial 确实有很好的文档记录。您只需要知道在 Wiki 中查找即可。
您可以查看 Mercurial 的 wiki 文章 RepositoryNaming 来找到一些答案。
您还应该阅读 Mercurial 官方手册: Mercurial:权威指南
祝你好运!
Mercurial is really well documented. You only have to know where to look in the Wiki.
You can look at Mercurial's wiki article RepositoryNaming to find some of your answers.
You should also read the official Mercurial manual: Mercurial: The Definitive Guide
Good luck!