仅查看 Mercurial 中的目录?
如何仅从 Mercurial 存储库中查看子目录?看来我只能查看整个存储库。
How can i check out only a sub directory from mercurial repository? It seems i can only check out the whole repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不,你不能。请参阅此处的讨论:
https://www.mercurial-scm.org/wiki/PartialClone
No, you cannot. See the discussion here:
https://www.mercurial-scm.org/wiki/PartialClone
你做不到。该功能已计划,但尚未实施。前一个人提供了一个很好的链接,您可以在其中阅读有关部分克隆功能的讨论。
现在,您应该非常小心地将内容分开,以便存储库是一个相当小的单元,在逻辑上可以作为一个整体进行管理。拥有 subrepos 的能力可能会帮助您组织和管理事物,直到该功能为止存在。
You can't do it. The feature is planned, but not implemented. The previous person gave a nice link to where you can read a discussion about the partial clone feature.
For now, you should just be really careful to divide things up so a repository is a fairly small unit that makes logical sense to manage in one piece. The existence of the ability to have subrepos might help you organize and manage things until that feature exists.
下一个最好的事情是使用 Convert 扩展,如下所述:
https://www.mercurial-scm.org/wiki/ConvertExtension
The next best thing is using the Convert extension as discussed here:
https://www.mercurial-scm.org/wiki/ConvertExtension
这是与 如何做相同的问题我在 Mercurial 中克隆了存储库的子文件夹? 所以那里和这里的答案将是相同的。我将总结它们:
sparse.py
安装了第三方扩展)。尽管有术语(最初的问题只是询问“签出”,这只能在 Mercurial 中克隆后发生,但 Subversion 并没有真正的克隆概念),NarrowHG 解决方案可以说是最接近所需的解决方案。
This is the same question as How do I clone a sub-folder of a repository in Mercurial? so the answers there and here are going to be same. I'll summarize them:
sparse.py
third-party extension installed).Terminology notwithstanding (the original question was asking about only "check out" which can only happen after cloning in Mercurial but Subversion doesn't really have the concept of cloning) the NarrowHG solution is arguably the closest to what was desired.