Mercurial 和 Bitbucket:如何构建存储库
我想从 Subversion 迁移到 Mercurial,特别是开始在 Bitbucket 上托管我的所有私人内容。我想知道如何将大型 SVN 存储库调整为 hg 存储库。我也是 Mercurial 的新手,但我想我了解基础知识。
我目前有一个大型 SVN 存储库。我有超过 150 个项目,其中大多数都很小,全部排列在子目录中。包括历史在内的内容不超过 100mb。我认为,我想做的是将它们作为单独的私人存储库全部放在 bitbucket 上,但随着其中一些成熟,我会将它们公开。
在我看来,唯一的方法就是购买 100 美元/月的团队计划——但这超出了我的价格范围,我真的希望更换我的 7 美元/月的 SVN 托管计划;所以这是专业或业余计划或什么都没有。
我是一个绝望的案例,还是有很多小项目的人可以通过某种方式有效地使用 bitbucket/mercurial?
非常感谢。
I'd like to move from Subversion to Mercurial, and specificially to start hosting all my private stuff on Bitbucket. I'd like to know how adapt a large SVN repo to hg repos. I'm new to mercurial, too, but I think I understand the basics.
I've currently got a single, large SVN repo. I have over 150 projects, most of them very small, all arranged in subdirectories. There's not much more than 100mb of content including history. What I'd like to do, I think, is put them all on bitbucket as individual private repos, but then as some of them mature I'll make them public.
The only way to do that, it seems to me, is to buy the $100/month team plan -- but that's way out of my price range and I'm really looking to replace my $7/month SVN hosting plan; so it's the Pro or Amateur plans or nothing.
Am I a hopeless case, or there some way for someone with lots of small projects to use bitbucket/mercurial effectively?
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,这很丑陋,但一种方法可能是在一个单独的命名分支中为每个项目创建一个大型私人存储库。这样,它们几乎是独立的,并且具有依赖关系的项目可以将其他项目包含为子存储库(使用
.hgsub
中的分支名称)。对于拥有有限私人回购协议的账户,可能会也可能不会违反 Bitbucket 服务条款的字面意思(可以说是精神:P)。至于逐步公开它们,项目间的依赖关系可能会让事情变得有点复杂,但在大多数情况下,我认为您可以简单地将它们克隆到公共存储库。
当然,所有这些都假设您无法克服从一开始就将它们全部公开的反对意见:)
编辑 30/09/2010:以下 Bitbucket 被 Atlassian 收购,免费计划现在允许每个用户拥有无限的存储库(公共和私有),名义上具有无限的磁盘空间,只要不超过 5 个用户可以访问他的私有存储库。
Hmmm, it's ugly, but one way might be to have one big private repo with every project in a separate named branch. That way, they're almost independent, and projects with dependencies can include others as subrepos (using branch names in
.hgsub
). May or may not violate the letter (arguably does the spirit :P) of the Bitbucket terms of service for accounts with limited private repos.As for incrementally making them public, inter-project dependencies might complicate things a bit, but for the most part I think you could simply clone them to public repos.
All assuming, of course, that you can't overcome your objections to just making them all public from the get-go :)
EDIT 30/09/2010: Following Bitbucket's acquisition by Atlassian, the free plan now allows each user unlimited repositories (public and private) with nominally unlimited disk space, as long as no more than 5 users have access to his private repos.