1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE chapter SYSTEM "../../dtd/dblite.dtd">
\r
3 <chapter id="tmerge-basics">
\r
4 <title>Basic Concepts</title>
\r
7 TortoiseMerge has several different uses:
\r
11 Viewing the difference between two files and merging
\r
12 changes into one of them, or removing unwanted changes.
\r
17 Editing conflicts between local changes and changes in the
\r
18 Subversion repository following an update.
\r
23 Applying patch files. This is the reason TortoiseMerge
\r
30 <sect1 id="tmerge-basics-diff">
\r
31 <title>Viewing and Merging Differences</title>
\r
33 In this mode you are comparing two files. The file in the left pane
\r
34 is considered to be the original file (sometimes referred to as
\r
35 <emphasis>Theirs</emphasis>, and the file in the right pane is the
\r
36 modified file (sometimes referred to as <emphasis>Mine</emphasis>.
\r
39 You can make simple line-based changes to the file in the right pane
\r
44 Reverting changed lines back to the text shown in the left pane.
\r
49 Using a combination of both blocks, either
\r
50 <emphasis>Theirs</emphasis> before <emphasis>Mine</emphasis> or
\r
51 <emphasis>Mine</emphasis> before <emphasis>Theirs</emphasis>.
\r
57 You can also edit the file in the right pane just as you would in a
\r
58 text editor. Such lines are marked using a pencil icon.
\r
59 Please note that if you want to make any of the line/block-based changes
\r
60 described above, it is better to do those first since once you start
\r
61 editing the file yourself it becomes impossible for TortoiseMerge to
\r
62 keep track of the relationship to the original files.
\r
65 <sect1 id="tmerge-basics-conflicts">
\r
66 <title>Editing Conflicts</title>
\r
68 This is sometimes referred to as a three-way merge, and is shown in three panes.
\r
69 However there are actually four files involved. The file which is not shown is
\r
70 the common base file, the last common ancestor of the two files which are now
\r
71 in conflict. The relationships between the three files are explained in
\r
74 <figure id="tmerge-dug-dia-conflict">
\r
75 <title>File Conflict</title>
\r
76 <graphic fileref="images/mergeprinciple.png"/>
\r
79 The base file represents the oldest version of a file, from
\r
80 where <emphasis>You</emphasis> and <emphasis>They</emphasis> start
\r
81 making changes. <emphasis>Mine</emphasis> represents
\r
82 the base file with all the changes <emphasis>you</emphasis> made,
\r
83 and <emphasis>Theirs</emphasis> is the file with all the changes
\r
84 <emphasis>someone else</emphasis> made to the file.
\r
85 The left pane shows the changes in <emphasis>Theirs</emphasis>
\r
86 relative to the base file and the right pane shows the changes in
\r
87 <emphasis>Mine</emphasis> relative to the base file. The bottom pane is the
\r
88 output file which is where you are trying to resolve the conflicts.
\r
91 In conflict resolution view, you can choose to use blocks from
\r
92 <emphasis>Mine</emphasis> or <emphasis>Theirs</emphasis> or both.
\r
93 But in this case, the changes are shown in the bottom pane.
\r
96 <sect1 id="tmerge-basics-patch">
\r
97 <title>Applying Patches</title>
\r
99 A patch file is a Subversion unified diff file, which contains
\r
100 the information required to apply changes to a set of files.
\r
101 The patch may have been supplied by another developer so that you
\r
102 can see changes he has made and possibly commit them to the repository.
\r
103 Or it may have been generated internally by TortoiseGit when comparing
\r
104 two folders. This happens when you compare a repository revision with
\r
105 your working copy folder, or if you compare two different repository
\r
106 revisions, or if you compare two different repository paths.
\r
109 In either case TortoiseMerge will show a small window listing the
\r
110 files included in the patch. By double clicking on one of these files
\r
111 you fetch the relevant file and apply the changes. The left pane shows
\r
112 the original file content and the right pane shows it after the patch
\r
116 You can edit the file in the right pane exactly as you would in
\r