Java Reference
In-Depth Information
Merging changes between versions
When you're using the diff viewer on a file that you have permission to edit, the
file is editable inside the diff viewer. You can even copy and paste code from the
older version, but there's an easier way to merge changes between versions.
IDEA provides a handy feature that lets you merge individual changes to the
file. Alongside each change block is a chevron symbol (ยป) for any changes or dele-
tions or an X for any content added to the current version that wasn't present in
the older one. Clicking either symbol applies its change to the current version of
the file. Clicking the X removes the addition from the new version, and clicking
the chevron merges in the new or modified code.
Resolving conflicts during merges
When you're working with multiple developers on the same project, conflicts may
arise when one developer commits changes to a file that you're actively working
on. When you attempt to commit your changes, CVS will require you to update
your copy to include the most recent changes. In most cases, CVS can gracefully
handle merging the changes into the modified file, but conflicts can arise in situa-
tions where both sets of changes affect the same lines of code. Conflicts also arise
when merging changes between the branch and the trunk. When there are con-
flicts, you can use the CVS Merge tool shown in figure 8.18 to resolve them. Select
the Merge option from the context menu of any item with conflicts listed in the
CVS status window.
Figure 8.18
IDEA's Merge tool lets you review merge conflicts and decide on how they should be
resolved.
 
 
 
 
 
Search WWH ::




Custom Search