Title: Subversion
1Subversion Eclipse
- How to use Subversion with our projects
2Subversion Eclipse
- To work with ssh, select Window-gtPreference
SVNKit (Pure Java)
3Subversion Eclipse
- If a project is not already loaded onto the
repository, you create it normally. - Add classes etc.
4Subversion Eclipse
- Now connect to your repository
click for perspective
when dialog appears, select SVN
Repository Exploring
5Subversion Eclipse
click to add repository
in dialog type URL of repository
"svnssh//simon.mines.edu/work/svn/ltTeam namegt"
6Subversion Eclipse
After selecting repository, it shows in list.
Expand to show what projects have been stored.
7Subversion Eclipse
- Must log in to Subversion. Use alamode id and
password.
Option to store login info (use with care)
8Subversion Eclipse
Can look at in repository, but cant edit until
check out.
No means no projects uploaded yet.
9Subversion Eclipse
- Adding a project (done in Java mode)
Right-click on project, then Team
10Subversion Eclipse
11Subversion Eclipse
12Subversion Eclipse
If there are existing projects Right-click on
project (NOT repository or src folder, but
project folder) and select Checkout
Remember, you can see files in repository mode,
but you must switch to Java Perspective to be
able to edit.
Finish OK
13Subversion Eclipse
In Java mode, Right-click select Team
should Update before Commit. This ensures your
files are updated with any changes made by other
team members, before your code is committed to
the repository.
14Subversion Eclipse
Attempt to commit without an update
Subsequent update, was then able to commit
15Subversion Eclipse
Sample History
Sample Compare, selected Revision and then a
number
16Subversion Eclipse
- You may want to add a folder for your unit tests
I called it test
17Subversion Eclipse
- Remember to add the JUnit library for your
project (this is not related to Subversion, just
a reminder)
18Subversion Eclipse
- Eclipse will indicate project not part of
repository
No VC info
19Subversion Eclipse
- Add the test directory to the repository
Right-click project, press Team then
20Subversion Eclipse
Right- click, select Team then commit
21Subversion Eclipse
- You may want to discard changes you are making
and get the original file from the repository.
This is a revert
Right-click Team Revert
22Subversion Eclipse
- You may want to check out an older revision of
the entire project
click to show history
Normally you select Head Revision.
23Subversion Eclipse
select
may use different name
Revision shows up in this dialog
press OK
24Subversion Eclipse
Heres older revision
Now you can edit files in the older revision as
you see fit.
25Subversion Eclipse
- May have conflicts if try to commit without
update (true even if not working from prior
revision!)
Conflict!
26Subversion Eclipse
- Four versions of conflicted file are made to help
resolve conflict.
working copy (mine)
merging with (r5)
BATest.java.mine, BATest.java.r5, BATest.java
(original), BATest.java.r4 You need to modify the
original, other copies are to assist you.
27Subversion Eclipse
- When you have fixed conflict, inform Subversion.
Right-click on file, Team
Now you can commit