Oct. 6, 2010
In the following, replace
[Name] with your name. For example,
Colorswithin the package
https://phoenix.goucher.edu/svn/samplerepository. There will be a
Practicedirectory within the repository. Open
Practiceto 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.)
Teammenu (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).
Teammenu, 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
red, the other changing
Update, getting the current version of resources from the repository. Choose one of the conflicted files and use the
Teamcommand to see your version and the current version side-by-side. You would use the
Show in Resource Historyto determine who committed the last version, so you could discuss changes.
Mark resolvedfrom the
Teammenu to mark the conflict resolved and then commit the update.
Updatecommand on the
Teammenu is for. When your own changes are stable, but before you commit, use
updateto 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.