简体   繁体   English

HG:从两个仓库的差异中导入更改

[英]HG: Importing changes from the diff of two repo

How could we manage to import into a hg repo the differences of two repos. 我们如何将两个仓库的差异导入到hg仓库中。

I mean, say we have repo A, A2 and B. I would like to import to repo B(same file structure than A) the differences between A2 and A (A2 is just A with some changes). 我的意思是说我们有仓库A,A2和B。我想导入仓库B(与A相同的文件结构)A2和A之间的差异(A2只是A,但有一些更改)。

I guess we should generate a diff between both directories and use hg import , but how should the diff be generated? 我猜我们应该在两个目录之间生成差异,并使用hg import ,但是差异应该如何生成?
is there a better way to do this? 有一个更好的方法吗?

If B is totally equal to A you can (in B) just pull from A2 如果B 完全等于 A,则可以(在B中)从A2拉出

If B also differ from A, you can: 如果B也不同于A,则可以:

  • pull A from A2 (get additional head in A2 as result) 从A2中拉出A(结果是在A2中获得另一个头部)
  • save diff of heads in A2 into file 将A2中的磁头差异保存到文件中
  • import result of previous operation into B 将先前操作的结果导入B

And, BTW, you can streamline your current exotic workflow 而且,顺便说一句,您可以简化当前的工作流程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM