We are no longer actively supporting Subversion.
Organize your code to import into the following structure:
myproject/ myproject/branches/ myproject/tags/ myproject/trunk/ myproject/trunk/dir1/ myproject/trunk/file1 ...
trunk
- the main line of development, the leading edge, where developers usually commit their regular changes. tags
- a collection of snapshots of the trunk (or a branch) at a user-defined point in time, for instance release day. branches
- active variations of the project compared to the trunk (or even another branch). This is useful when working out a (big) change that needs to be coordinated in a team or when using a single working-copy for the work with the changeproject is not feasible.
Assuming the project
directory is a subdirectory of the current directory, you would enter the following command:
svn import project file:///path/to/repository/newproj_name -m "First Import"
e.g.,
svn import Logic file:///home/courses/cs297/shared/svn/Logic -m "First Import"
svn checkout file:///repository_name/project/trunk project
svn add file_or_dir_name
svn delete file_or_dir_name
svn commit
svn update
Code | Meaning |
---|---|
A | Added |
D | Deleted |
U | Updated |
C | Conflict |
G | Merged |
To give a version of the project a name, use svn copy
svn copy file:///path/to/repos/project/trunk \ file:///path/to/repos/project/tags/release-1.0 \ -m "Tagging the 1.0 release of the project."
Conflicts can be detected with the update command. When Subversion detects a conflict in a file, it places conflict markers into the file (to allow the user to find the places of the conflict) and creates the following three files in the directory:
The file without the conflict markers
The file as it was before I started to change it.
The HEAD revision of the file
Resolving conflicts Conflicts can be resolved by doing one of the following three things:
svnadmin create /path/to/repos
The actual repository/directory should not have been created yet. This command will handle that for you.
Use the svn+ssh://
URL schema to connect.
Example:
svn list svn+ssh://host.example.com/repos/project harry@host.example.com's password:
Subclipse is a plugin for Eclipse that allows users to easily use Subversion with their code.
svn+ssh://username@atmos.cs.wlu.edu/svn/csrepos/repository_name
The Team menu is where you'll find the commands you need to work with the subversion repository.
Of course, you may not want to use the command-line.