Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A change that is a conflict is when 2 people have both made a change to the same file in such a way that the two changes can not be automatically resolved.</p> <p><strong>1) Lets start with an example of a non-conflicting merge.</strong></p> <p>Original file</p> <pre><code>line1 line2 line3 </code></pre> <p>Person A changes it to this:</p> <pre><code>line1CHANGED line2 line3 </code></pre> <p>Person B changes it to this:</p> <pre><code>line1 line2CHANGED line3 </code></pre> <p>When those are both checked in and merged, there is no conflict because it can easily resolve to produce this final file:</p> <pre><code>line1CHANGED line2CHANGED line3 </code></pre> <p>Subversion will handle this automatically as a merge.</p> <p><strong>2) Now an example of conflicting changes.</strong></p> <p>Original file</p> <pre><code>line1 line2 line3 </code></pre> <p>Person A changes it to this:</p> <pre><code>line1CHANGED_BY_A line2 line3 </code></pre> <p>Person B changes it to this:</p> <pre><code>line1CHANGED_BY_B line2 line3 </code></pre> <p>This can't be merged automatically, so it is a conflict. You will need to resolve, either by accepting person A's change or person B's change. In this case subversion will warn you of conflicts and require a decision from you on how to resolve them.</p> <p><strong>3) Finally, you can have both conflicting and non conflicting changes within the same revision.</strong></p> <p>Original file</p> <pre><code>line1 line2 line3 </code></pre> <p>Person A changes it to this:</p> <pre><code>line1CHANGED_BY_A line2ALSO_CHANGED_BY_A line3 </code></pre> <p>Person B changes it to this:</p> <pre><code>line1CHANGED_BY_B line2 line3ALSO_CHANGED_BY_B </code></pre> <p>Now, with this example, both people have changed the file, and there is a conflicting change on line 1 that must be resolved, but lines 2 &amp; 3 are non-conflicting changes and can be resolved automatically.</p> <p>You can choose to resolve this in several ways. </p> <p>Firstly, you can fully accept either A's or B's file and discard the other. This would result in the other persons non-conflicting changes being lost. Say, you choose to fully resolve using A, your final file would be:</p> <pre><code>line1CHANGED_BY_A line2ALSO_CHANGED_BY_A line3 </code></pre> <p>(Exactly A's file, and all changes by B are discarded)</p> <p>Secondly, you can resolve only the conflicting changes, and still retain all the non-conflicting changes. This was you would choose either A's or B's change for the first line, and still get both of the other line's changes, from both people. So, say for example you choose to resolve conflicts using A, your final file would be:</p> <pre><code>line1CHANGED_BY_A line2ALSO_CHANGED_BY_A line3ALSO_CHANGED_BY_B </code></pre> <p>Alternative you can use tools like <a href="http://kdiff3.sourceforge.net/" rel="noreferrer">KDiff</a> that support reviewing of each conflict separately (because of course you can have mutliple changes, both conflicting and non-conflicting, within the same file), which will allow you to select different methods of resolution for each.</p> <p>If you are having trouble understanding merging with the command line tools I strongly recommend you take a look at KDiff (or some other GUI merge/diff tool) as they display the files alongside each other (along with the original) and allow you to visual what each resolution action would do.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload