tortoise hg 将两个独立的 Mercurial 项目克隆到同一目录
我想将两个项目从单独的远程 Mercurial 存储库合并到同一个本地目录中(一个是框架,另一个是我的代码)。
我的想法是简单地将它们克隆到同一个工作目录,但这会使用 tortoise hg 生成错误abort:destination 'C:\Workspace\project' is notempty
。
这是解决这个问题的正确方法吗?如果是的话,有人知道如何让它发挥作用吗?
I wanted to combine two projects from separate remote mercurial repositories into the same local directory (one is a framework, the other my code).
My thoughts about doing this were to simply clone them both to the same working directory but this generates the error abort: destination 'C:\Workspace\project' is not empty
using tortoise hg.
Is this the right way to approach this and if so does anyone know how to get this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您确定要这样做吗?在合并后,如果不从两个“项目”中获取所有内容,就无法安全地推回原始来源。
换句话说,它们实际上成为一个项目,并且将其拆分回来并不容易。
您应该考虑使用子存储库,这是Mercurial 处理这类事情。
话虽如此,要合并两个不同的存储库,您需要将一个存储库拉入另一个存储库。
换句话说,您将执行以下操作:
如果其中任何一个不清楚,请留下您的问题的评论,我将相应地更新/编辑。
First of all, are you sure you want to do this? There's no way to safely push back to the original sources without getting everything, from both "projects" after you have combined.
In other words, they effectively become one project, and it won't be easy to split it back up.
You should consider using sub-repositories which is the typical way that Mercurial deals with these sorts of things.
Having said that, to combine two distinct repositories, you need to pull one into the other.
In other words, here's what you would do:
If any of this was unclear, please leave a comment with your questions and I'll update/edit accordingly.