SVN Resolving Conflicts

While I guess it’s showing its age, but subversion is still a pretty good source control tool. My problem with it is that I’m always confused about what to do when I get a conflict. This is probably because I only deal with this issue a few times a year.

Here’s what I do when I get a conflict when I’m merging or whatever.

For me there are really two options: postpone or their side of the conflict. If I select postpone, the file is marked up with the conflict. It would look something like this.

<<<<<<< .mine
// This is not speled correctly.
=======
// This is now spelled correctly.
>>>>>>> .r8390

It happened because that same line of code is modified by different checkouts of the repository. If I select their side of the conflict, the bottom code is used and I don’t have to do anything. If I select postpone, I have to go into the file, edit it with the correct code and then run “resolved” on the file (e.g. derp.php).

svn resolved derp.php

If I were to have selected my side of the conflict, the incorrectly spelled comment would be used. It depends on how you do things, but for me, it’s always their side of the conflict that works best. Postpone is if I have to think about which one is really the best code to use.

Share Button