This section is from the "Version Control with Subversion" book, by Ben Collins-Sussman, Brian W. Fitzpatrick and C. Michael Pilato. Also available from Amazon: Version Control with Subversion.
There are four different ways to resolve conflicts interactively—two of which allow you to selectively merge and edit changes, and two of which allow you to simply pick a version of the file and move along.
If you wish to choose some combination of your local
changes, you can use the “edit” command
(e) to manually edit the file with
conflict markers in a text editor (determined by the
EDITOR
environment variable). Editing
the file by hand in your favorite text editor is a somewhat
low-tech way of remedying conflicts (see the section called “Merging Conflicts by Hand” for a
walkthrough), so some people like to use fancy graphical
merge tools instead.
In order to use a merge tool, you need to either set the
SVN_MERGE
environment variable, or define
the merge-tool-cmd
option in your
Subversion configuration file (see the section called “Configuration Options” for more details).
Subversion will pass four arguments to the merge tool: The
BASE
revision of the file, the revision
of the file received from the server as part of the update,
the copy of the file containing your local edits, and
lastly, the merged copy of the file (which contains conflict
markers). If your merge tool is expecting arguments in a
different order or format, you'll need to write a wrapper
script for Subversion to invoke. After you've edited the
file, if you're satisfied with the changes you've made, you
can tell Subversion that the edited file is no longer in
conflict by using the “resolved” command
(r
).
If you decide that you don't need to merge any changes, but just want to accept one version of the file or the other, you can either choose your changes (aka “mine”) by using the “mine” command (m) or choose theirs by using the “theirs” command (t).