Mercurial 1.4.x 中的 subprepos 功能是否适合生产使用?
我想针对我的工作项目评估 Mercurial。但我的大多数项目都非常依赖 svn:externals 之类的支持。我在 StackOverflow 上进行了搜索,并在 Google 上搜索了 Mercurial 中的相应支持。我发现的只是 Mercurial 1.3 中添加的 subrepo 功能,但是此功能的页面说:
子存储库是 Mercurial 1.3 的一项实验性功能。因此,不要在关键任务存储库上执行此操作!
我不想使用不稳定的东西。
任何人都可以阐明此功能的真实状态,以及完善/完成它的计划,以及何时将其称为“稳定”并为关键任务存储库做好准备?
I'd like to evaluate Mercurial for my working projects. But most of my projects very heavily rely on the presence of svn:externals-like support. I've searched over StackOverflow and googled for corresponding support in Mercurial. All I found is subrepo feature added in Mercurial 1.3, but the page for this feature said:
subrepos are an experimental feature for Mercurial 1.3. So don't do this on mission critical repositories!
I don't want to use something unstable.
Can anybody shed some light on the real status of this feature, and the plans of polishing/finishing it and when it will be called "stable" and ready for mission critical repositories?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
#mercurial IRC 频道中的说法是,子存储库将继续像以前一样工作,并且支持将会增长。例如,目前“hg status”命令无法识别子存储库——它可以工作,只是不会递归,但将来它会的。但是,当前的行为、文件格式(.hgsub 和 .hgsubstate)只会以向后兼容的方式进行更改。
所以,现在就继续相信它,并期待它变得更好。
PS 从 Mercurial 1.4.2 开始,子存储库现在可以是 Subversion 存储库,因此您可以使用 Mercurial 父级和 svn 子级。
The word in the #mercurial IRC channel is that subrepos will continue to work as they do, and support will grow. For example currently the 'hg status' command isn't subrepo aware -- it works, it just doesn't recurse, but that in the future it will be. However, the current behaviors, fileformats (.hgsub and .hgsubstate) will only be changed in backward compatible ways.
So, go ahead and count on it now, and look forward to it getting better.
P.S. As of mercurial 1.4.2 the subrepos can now be subversion repos, so you can use a mercurial parent and a svn kid.
到目前为止,我在(轻度)使用该功能时运气很好。它在两个地方派上用场:
hg pull
命令备份不相关存储库的树。hg 克隆
获得可构建的源代码。这更接近典型的 svn:externals 用法。以下是我迄今为止看到的一些限制:
clone
、push
/pull
、update
/提交
,也许还有其他一些。当 Mercurial 团队将该功能描述为“实验性”时,他们并不意味着它会突然决定删除您的所有数据。它们只是意味着他们没有围绕名称冲突等所有边缘情况进行编码(例如,一个开发人员添加了一个名为
README
的子存储库,而另一位开发人员添加了一个名为README
的文本文件>)。I've had good luck with the feature in my (light) usage of it so far. It's come in handy in two places:
hg pull
command.hg clone
gets buildable source code. This is closer to the typicalsvn:externals
usage.Here are a couple of the limitations I've seen with it so far:
clone
,push
/pull
,update
/commit
, and perhaps a couple of others.When the Mercurial team describes the feature as "experimental," they don't mean that it's suddenly going to decide to erase all your data. They just mean that they haven't coded around all the edge cases like name conflicts (e.g., one developer adds a subrepo called
README
, while another developer adds a text file calledREADME
).