第 1 章 介绍

目录

概述
TortoiseMerge 的历史

概述

  TortoiseMerge 是一个免费软件/开源软件。通过它你可以查看文本文件之间的差异,并合并这些差异;甚至审查和采用这些标准差异文件——通常称之为 补丁

  当处理文本文件时,比如用你所喜欢的编程语言写的源代码,或者 Html/Xml 的文档或网站,你经常会碰到需要比较文件的不同版本的情况:有时候你从别人那里得到了一个不同版本的文件,或者有时候干脆就是你想知道你曾经做过什么修改。

  如果你使用版本控制系统(如 Subversion)时,当你更新工作副本时你可能会遇到“ 冲突 ”。这种情况通常发生在其他人也修改了你当前正在处理的文件的同一部分。当遇到冲突时,你必须手工来解决它——这就是 TortoiseMerge 能帮助你的地方。

  下图说明了存在冲突的文件之间的关系。

图 1.1. 文件冲突

文件冲突

A conflict can also occur if you try to apply an outdated patch file. In such cases, without TortoiseMerge, you would either have to ask the person you got that patch file from for a current version or try to apply that patch file manually.

But now with TortoiseMerge this isn't necessary anymore - at least not if you're working with a version control system like Subversion. TortoiseMerge parses the patch file for the revision/version the patch was created for and automatically tries to fetch that specific version from your source-control. Then it applies the patch and lets you review both your changes to the file, and theirs. Then you can decide which changes you want to keep.