CS 245
Oct. 6, 2010
In the following, replace [Name]
with your name. For example,
[Name]Project
becomes
TomProject
.
[Name]Project
.
Colors
within the package
myPackage
.
https://phoenix.goucher.edu/svn/sample
repository. There will be a
Practice
directory within the repository. Open Practice
and
double-click Colors.java
within Practice
to open it. Copy
the source code, pasting it into the file containing your
Colors.java class and replacing everything already in the file.
(You don't ordinarily use Subversion this way. What you're doing here is creating a project which you'll soon share/checkin to the repository.)
Team
menu (right-click the project folder in the Package
Explorer), share your project out to the repository, into the directory
[Name]Project
. (Under Windows 7 in the labs, follow this with an
immediate commit.) This is how you initially share new work with your
project team.
Confirm that the project is now in the repository (you may have to click Refresh View for the changes to appear).
Team
menu, disconnect your project from the repository,
deleting the meta-data. (This isn't something you would ordinarily do, but
is necessary for the next step, in which you'll practice the initial
checkout of an existing project from Subversion.)
Completely delete the local copy of your project. (Again, this isn't something you would ordinarily do.)
What happens if two team members make a change to the same line of a source file, and then try to commit their separate changes? This is known as a conflict and must be resolved. The team members would need to discuss the conflicting changes, resolve them, and commit the final change. Work in teams of two or three for this part of the lab.
Colors.java
, one changing
blue
to red
, the other changing blue
to green
.
Team
menu, select Update
, getting the
current version of resources from the repository. Choose one of the
conflicted files and use the Edit conflicts
Team
command to
see your version and the current version side-by-side. You would use the
Team
command Show in Resource History
to determine who
committed the last version, so you could discuss changes.
Mark resolved
from the Team
menu to mark the conflict
resolved and then commit the update.
Update
command on the Team
menu is for.
When your own changes are stable, but before you commit, use update
to get the latest, most complete set of project files and re-test your
changes. At the time of this update, you may be alerted to editing
conflicts, which must be resolved. You should also always perform an
update just before committing changes to the repository.