合并/编辑冲突

  TortoiseMerge 不仅 显示 了你文件间的不同,而且还能让你解决存在的冲突或者采用修改。

如果你在双窗口模式,你只能编辑右窗口中的文件(我的)。要应用左边的文件修改(他人的),在修改行上右击,选择上下文菜单使用“他人的”文本块。于是左边文件的修改就增加到右边的文件。

有时候,你实际上需要双方的文本块,上下文菜单 使用双方的文本块 (这个先出现)上下文菜单使用双方的文本块 (这个后出现)可以满足你的要求。

You can also edit the output file just as you would in a text editor. Such lines are marked using a pencil icon. Please note that if you want to make any of the line/block-based changes described above, it is better to do those first since once you start editing the file yourself it becomes impossible for TortoiseMerge to keep track of the relationship to the original files.

如果你在三窗口模式(有时称为合并视图),你只能编辑底部窗口中的文件(已合并)。象在两窗口模式那样,你可以在冲突行上右击,或者选择上下文菜单使用“他人的”文本块,或者上下文菜单使用“我的”文本块。此外,如果你要两者的文本块,可以选择上下文菜单在“他人的”前面使用“我的”文本块,或者 上下文菜单在“我的”前面使用“他人的”文本块。通过你选择的命令,改变结果在已合并文件。

Sometimes a file will be marked as conflicted in Subversion, yet when you view it using TortoiseMerge there are no conflicts shown. This may be due to the whitespace handling you have chosen. If you choose to ignore line-endings or whitespace changes, those lines will be marked using the Conflict-Ignored icon. To resolve the conflict you still need to pick which version you want to use.

有时冲突很难通过简单选择他人的我的来解决,需要手工编辑。TortoiseMerge 允许你先在可视化模式做所有容易的合并,然后保存文件,将困难的合并用手工解决。

重要

注意:如果你在同一文件重新使用 TortoiseMerge,你对工作版本做的任何修改,无论是 TortoiseMerge,还是手工编辑,都将被丢弃,文件恢复到开始冲突编辑时的状态。