Many times, the SVN can automatically merge changes to different parts of a file. Conflicts can arise when changes appear that don’t gel: Joe wants to remove eggs and replace it with cheese (-eggs, +cheese), and Sue wants to replace eggs with a hot dog (-eggs, +hot dog).
At this point it’s a race: if Joe checks in first, that’s the change that goes through (and Sue can’t make her change).
When changes overlap and contradict like this, SVN may report a conflict and not let you check in — it’s up to you to check in a newer version that resolves this dilemma.
A few approaches:
. Sync to the the latest version (r4) and re-apply your changes to this file: Add hot dog to the list that already has cheese.
- Override their changes with yours
. Check out the latest version (r4), copy over your version, and check your version in. In effect, this removes cheese and replaces it with hot dog.
Conflicts are infrequent but can be a pain. Usually I update to the latest and re-apply my changes.
No comments:
Post a Comment