CSE 70, Fall 2008
Software Engineering
Lab 4 Instructions
Using Subclipse and Handling Conflicts.
PART I: Eclipse and Subclipse
- Run Eclpise by entering into the terminal the command eclipse.
- Select an appropriate place to put your workspace, all of your source code wil be saved to this directory
- To Download your project from the repsoitory using the subclipse plugin
- Find the subclipse plugin by going to Window -> show view -> SVN Repositories
- Click the add repository button on the SVN Repositories window and add your team's svn repository as the url (http://cse70.ucsd.edu/svn/team[INSERT TEAM #]/ ) and login with the username and password we provided you when prompted
- You should now see the code in your svn window. To download your code you must right click on the trunk and select the 'checkout...' option.
- You will be prompted to select options for checkout. Select the 'Checkout as a project configured using new project wizard' option.
- In the wizard select Java->Java Project then click next. Name your project and click finish
PART II: Editing and Checking In files
- In your teams, split into 2 groups, have both groups change the default quit message to something unique, and make sure that both are different.
- Have only one group commit the change to the repository
- make sure to run ant before commiting! In the ant view, add the build.xml file. Then just hit run(big green button) in the ant view. If ant is not open on your eclipse go to Window -> Show View -> ant
- you will have to correct a failing test, do so and run ant again before commiting
- once your program works, try to commit. Right click on yor project in the package explorer and select Team -> commit...
- enter the appropriate comments
- Once one group has commited, combine back into one team around the group that has not commited yet. You will now be dealing with the conflict created by both groups editing the same piece of code
- Update your uncommitted project by right clicking on your project in the package explorer and selecting Team -> update
- Note that eclipse now has raised a conflict on your edited file, to resolve these select Team -> Edit Conflicts...
- you will be brought to a screen where it shows your edits on the left and the repository's version on the right
- SVN has no way of knowing who has the correct change, so it is up to the person committing to make sure that they merge all changes without breaking the program.
- A key to conflict resolution is to understand what the other person was trying to accomplish, as to not break thier functionality. In more complex examples you will be dealing with other team member's code, so be cautious and dont break thier tests or improvments.
- So before you commit your changes come up with a new default quit message that keeps with both quit messages ideas.
- Once you have a copy you are ready to commit to the repository, right click on the file select Team -> Mark as Resolved
- Compile your code one last time, then commit. Dont forget Comments!