svn - A example of a change that is NOT a conflict -


I am trying to understand the details of severance orders. I think understanding the difference between a change which is a struggle and a change, which is not a struggle, will help.

This is a follow up for this.

itemprop = "text">

A conflict that occurs, when 2 people have made a change both ways in the same file , Then two changes can not be resolved automatically.

1) Start with an example of a non-dispute merging.

The original file

  line1 line2 line3  

The person changes it on:

< pre> line1CHANGED line2 line3

person B it gives the change to:

  line 1 line2CHANGED line 3  

when checking into them and are merged, there is no dispute because it can be easily solved by making the final file:

  line1CHANGED line2CHANGED line 3 < / Code> 

Subversion will automatically handle it as a merge.

2) now provide a confl

original file

  line1 line2 line3  

person A. it varies on this:

  line1CHANGED_BY_A line2 line 3  

person B changes to this:

< Pre> line1CHANGED_BY_B line2 line3

It can not be merged automatically, so this is a conflict. You will need to solve either by accepting change of A or acceptance of person B. The reversal in this case will warn you about conflicts and you will need to make a decision about solving them.

3) Finally, you can make both conflicting and non-controversial changes within the same amendment. / Strong>

Original file

  line1 line2 line3  

The person changes it on:

  line1CHANGED_BY_A line2ALSO_CHANGED_BY_A line 3  

person B changes to this:

  line1CHANGED_BY_B line2 line3ALSO_CHANGED_BY_B  

Now, with this example, both have changed the file, and there is a conflicting change on line 1 that should be solved, but line 2 & amp; 3 are non-conflicting changes and can be sorted automatically.

You can choose to solve it in many ways.

First of all, you can fully accept A and B files and leave the other, resulting in other non-disputed changes being lost. Say you choose to solve using a totally be your final file:

  line1CHANGED_BY_A line2ALSO_CHANGED_BY_A line 3  

(the one in File, and all changes are rejected by B)

Secondly, you can only solve disputed changes, and still can maintain all non-disputed changes. You will either select the change for either the first line of A or B, and still get both the changes of both the lines of the two people. So, you choose to solve the disputes using one, for example, your final file will be:

  line1CHANGED_BY_A line2ALSO_CHANGED_BY_A line3ALSO_CHANGED_BY_B  

Alternatively, you can use tools like that to support the individual review of each conflict (of course you can change both the contradictory and the non-contradictory changes within the same file), which is for each of you Different to resolution Methods will allow you to choose.

If you are having trouble understanding the merger with command line tools, take a look at KDiff (or some other GUI merge / DIF device) because they display files with each other (With the original) and allow you to see what each resolution action must be done.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -