Resolving Merge Conflicts
When you use a version control system, you might need
to merge changes you made to a file with changes made to the
same file by someone else. When you update a locally modified
file, CVS automatically merges changes from the
repository with changes made to your
local file. But when conflicts occur, you must
decide how to resolve each conflict before you can
check your local file into the repository.
You can resolve merge conflicts:
- In the source file. Each conflict is marked with
arrows followed by the lines from the two files that
caused the conflict. To resolve conflicts manually in the
source file, delete the arrows and the text that you do not
want for each conflict in the file.
- Through the Merge Conflicts Resolver.
The Merge Conflicts Resolver allows
you to use a graphical interface to resolve the conflicts.
The Merge Conflicts Resolver shows you the two files
that caused the merge conflict plus a third pane that shows
you the file with the text you chose to resolve the conflict.
The Merge Conflicts Resolver is available on CVS command-line
filesystems only.
To resolve merge conflicts through the Merge Conflicts
Resolver:
- In the Explorer, right-click the node of the file that
shows the status Merge Conflicts after the file name
and choose Resolve Conflicts
from the contextual menu.
The Merge Conflicts Resolver is displayed. Merge conflicts
are highlighted in red. The icons in the
upper-lefthand corner allow you to move
through the conflicts in the file.
- For each conflict, decide which pane has the text that should be accepted.
If neither pane has the text you want, open your source
file and edit it. When you are done making
changes, right-click the node of your source
file and choose
CVS
Update
from the contextual menu. Then repeat Step 1 in this section.
- Click Accept above the pane that has the text that
you want.
The text you chose is now highlighted in green and is displayed
in the Merge Result pane. The text in the pane you did not choose
is highlighted in blue.
- When you have resolved the conflicts, click OK.
 |
To change the background highlight colors that the
Merge Conflicts Resolver uses, choose
Tools
Options. Expand IDE Configuration
Server and External Tools Settings.
Expand Diff and Merge Types
Merge Visualizers. Select Graphical Merge Conflicts Resolver and select
the setting you want to change. Click
the ellipsis button (...) to choose a color
from a color palette.
|
Legal Notices