Version Control Software
- Make changes to a file
- Do an "SVN Update" this will pull down any changes from
the version in the repository (in Netbeans this is "silent" the
file just magically gets any non-conflicting changes)
- Commit your file to the repository (your changes & the ones you just
received from the update) are submitted back to the repository.
- If the version on the repository has changed since you last pulled an update:
- Netbeans: you will be reminded that your version is out of date and
that you must run an update before committing.
- Eclipse (Subclipse): you will get an error message saying the transaction
is out of date.
If you get a conflict (in NetBeans), don't just edit the file by hand, click
on team; resolve conflicts and a nice merge editor will be displayed.
An advantage of Eclipse over Netbeans is that "Subclipse" supports
display of the last person who committed a file.
Eclipse (Subclipse) conflict resolution:
- Developer A makes a change without knowing that Developer B committed a
change to the file that Developer A is in the process of editing.
- Developer A attempts to commit the file, but receives a error "Problem
- Developer A does an "update" ("Update to HEAD") to fetch
the latest version from the server. This results in a conflict being reported
in the console and a mess in the displayed file in the editor. Do not try
and clean up the mess.
- Developer A right clicks on the file and selects Team; Edit Conflicts
a Conflicts on "filename" editor window is opened. On the left is
the merged file which will become Developer A's good integrated
version. This conflict window supports nice automatic features such as Copy
all non-conflicting changes from right to left and nice buttons to step
to the next conflict.
- After the developer has contemplated the changes and edited to create a
final good integrated version in the left pane, close the window. Hopefully
Developer A has carefully considered and integrated Developer B's changes.
- Right click again and select Team; Mark Resolved choosing Conflicts
have been resolved in the file. and click ok.
- Now commit the integrated file to the SVN server.
- Developer B can now do an update and will see the integrated changes.