使用 hg 克隆特定目录?
我来自 Subversion 背景,但我正在慢慢迁移到 Mercurial。
当开始我的许多项目时,我会设置一个开发环境,该环境被配置为开发应用程序/web应用程序/程序的特定起点(很像 Maven 2 原型,但不一定是 Java/Maven)。
稍后我会通过其特定路径从我的 svn 存储库中签出这个原型/模板项目;然后通过存储库从版本控制中导出工作副本;这样我就可以将工作副本导入回另一个存储库,而无需将对工作副本所做的更改添加到模板/原型项目的基础中。
我尝试在 Mercurial 中做同样的事情,但由于无法签出,我遇到了困难,呃..嗯..不,<从 hg 存储库克隆一个特定路径。
如果我想使用 Mercurial 实现同样的功能,我应该怎么做?
使用标记分支?原型/模板项目非常不同,但我想将它们保留在同一个存储库中。
I come from a Subversion background, but I am slowly migrating to Mercurial.
When starting on many of my projects, I would setup a development environment that was configured to a particular starting point in developing an app/webapp/program (much like a Maven 2 archetype, but not necessarily Java/Maven).
Later I would checkout this archetype/template project out of my svn repo by its particular path; and than export the working copy from version control by the repository; so that I could import the working copy back in to another repository without adding the changes that I made to the working copy to the base the template/archetype project.
I've tried doing the same thing in Mercurial, and I've run into a wall since I can't check out, er..um..no, clone a specific path from the hg repository.
If I want to achieve the same sort of functionality using Mercurial, what should I do?
Use tagged branches? The archetypes/template projects are very different, but I'd like to keep them in the same repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
存储库是 Mercurial 中一个更加轻量级的概念。尽管您说您想避免它,但在这种情况下我可能会创建一个单独的存储库。如果您需要在存储库之间共享历史记录,则可以使用 ShareExtension 。
The repository is a much more lightweight concept in Mercurial. Although you said you would like to avoid it, I would probably create a separate repository in this situation. In situations where you require a shared history between your repositories, you can use the ShareExtension.