SVN
This is a short introduction on how Subversion functions.
Use
If the environment is not established (i.e, the first time that the particular account or module is accessed), then proceed as follows:- Log on
svn checkout --username c74xyz svn://svn.cs.umu.se/2007/5dv999/c74xyz_c74foo 5dv999_2007
Type in the password for USER
.svn
in every directory of the module. (you shouldn't modify anything in there though)
- Check if there is anything to update:
svn status -u
Example:M * 2 apa Status against revision: 3
This says that apa is locally Modified, the * denotes that there are updates available to this file and you have revision 2 of the file. The repository is at revision 3. - Update (fetch the modifications of others):
svn update
Modifications to files will be merged where possible. If both you and someone else has made changes to the same line, you will get a conflict. It will be marked in the source code, usesvn resolved FILE
afterwards to say you are done orsvn revert FILE
to undo your changes and just keep the latest from SVN. - Compare the saved version with that in the SVN tree:
svn diff FILES
(FILES not specified = check everything)
- Check in a change to the SVN tree:
svn commit FILES
(FILES not specified = commit all changes) - Create a new directory in the SVN tree:
svn mkdir NEWDIR
- Insert a file in the SVN tree:
svn add FILES
For information about various commands, use svn help update
for instance.
Basic work cycle taken from the SVN Book
- Update your working copy
- svn update
- Make changes
- svn add
- svn delete
- svn copy
- svn move
- Examine your changes
- svn status
- svn diff
- Possibly undo some changes
- svn revert
- Resolve Conflicts (Merge Others' Changes)
- svn update
- svn resolved
- Commit your changes
- svn commit
GUI
On the Linux machines, the GUI 'rapidsvn' is installed. It will probably be installed on the Windows machines soon too.Further reading
Jan-Erik Moströms tutorialhttp://svnbook.red-bean.com/
http://subversion.tigris.org/
Subversion in Eclipse [ibm.com]