简体   繁体   English

从一个分支的工作副本合并到另一个分支(本地,不提交)

[英]Merge from one branch's working copy to another branch (locally, w/o committing)

Most of my experience is with Perforce and my last svn experiences were ages ago, so I'm not yet that comfortable with (Tortoise) svn (again). 我大部分的经验是在Perforce上,而我最近的svn经历是很久以前的,所以我对(Tortoise)svn还是不太满意。

I want to move changes over from a working copy to a freshly checked out working copy in another related branch. 我想将更改从工作副本移至另一个相关分支中的新签出工作副本。

To be preceise, consider: 首先,请考虑:

    trunk_revx
        |     \
        |      Branch_A
    trunk_revy   \
        |\       WC_A (containing my changes)
        | \
        |  Branch_B
        |    \
        |    WC_B (fresh, where I want to merge my changes to)

Which would be the correct command to get me a three-way-merge between WC_A, trunk_revx and WC_B without committing anything? 在不提交任何内容的情况下,使我在WC_A,trunk_revx和WC_B之间进行三路合并的正确命令是什么? Merge (call in which WC folder?) or Switch (again, call where?)? 合并(在哪个WC文件夹中调用?)或切换(再次在哪里调用?)?

All the terms are different, So I'm a little lost ;) 所有的术语都不同,所以我有点迷失了;)

I suggest you the following actions: 我建议您采取以下措施:

  1. From WC_A: save your local changes by creating a patch file with TortoiseSVN (in case the next actions would fail and lose your changes) 从WC_A:通过使用TortoiseSVN创建补丁文件来保存本地更改(以防后续操作失败并丢失更改)
  2. From WC_A: perform TortoiseSVN ==> switch... and switch to Branch_B: 从WC_A:执行TortoiseSVN ==> switch...并切换到Branch_B:
    • the Branch_B is merged into WC_A (locally) Branch_B合并到WC_A(本地)
    • and your local modifications are kept 并保留您的本地修改
    • and now your WC_A points to Branch B 现在您的WC_A指向B分支

You just have to deal with the fact that your WC_A becomes your WC_B ! 您只需要处理您的WC_A成为WC_B的事实!

Alternatively, if you don't want to commit into Branch_A, but can commit anyway, you could also commit local changes to a new small branch (a branch of branch_A) and perform a merge from this new branch to Branch_B. 另外,如果您不想提交到Branch_A,但是仍然可以提交,则还可以将本地更改提交到新的小分支(branch_A的分支),然后执行从该新分支到Branch_B的merge

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

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