
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
36
|
Chapter 3: Guided Tour
$ svn delete README
D README
$ svn revert README
Reverted 'README'
$ svn status README
README
Resolve Conflicts (Merging Others’ Changes)
We’ve already seen how svn status -u can predict conflicts. Suppose you run svn
update
and some interesting things occur:
$ svn update
U INSTALL
G README
C bar.c
Updated to revision 46.
The U and G codes are no cause for concern; those files cleanly absorbed changes
from the repository. The files marked with
U contained no local changes but were
Updated with changes from the repository. The G stands for merGed, which means
that the file had local changes to begin with, but the changes coming from the reposi-
tory didn’t overlap in any way.
But the
C stands for conflict. This means that the changes from the server overlapped
with your own, and now you have to manually choose between them.
Whenever a conflict occurs, three things occur to assist you in noticing and resolv-
ing that conflict:
• Subversion prints a
C during the update, and remembers that the file is in a state
of conflict.
• Subversion places conflict markers—special strings of text which delimit the
sides of the conflict—into the file to visibly demonstrate the overlapping areas.
• For every conflicted file, Subversion places three extra files in your working
copy:
filename.mine ...