| META TOPICPARENT | name="CemITSystem" |
Contents
Initial Setup
- need following packages: Apache, subversion, mod_dav_svn (install with yum)
configuration
- edit /etc/httpd/conf.d/subversion.conf as follows:
<Location /repos>
DAV svn
SVNPath /var/www/svn/repos
# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Subversion repos"
AuthUserFile /etc/svn-auth-conf
Require valid-user
</LimitExcept>
</Location>
cd /var/www
sudo mkdir svn
cd svn
sudo svnadmin create repos
sudo chown -R apache.apache repos
sudo service httpd restart
Setting up repository and importing
- set up standard directory tree
mkdir myproj
cd myproj
mkdir trunk
mkdir branches
mkdir tags
cd trunk
<put all main files here>
- import the tree (assuming myproj is in current directory):
svn import myproj file:///var/www/svn/repos/myproj -m "Initial layout and import for myproj"
to checkout repository
- svn co http://cronus/repos/emip_distr
- once you checked out the repository from a particular server, then all update and commit commands refer to this server
- there is an .svn file hiding in all the directories
to commit changes to repository
- svn commit -m "comment"
- svn ci -m "comment" (same thing)
- can apply to entire trunk or only to individual directories
- in order to do be able to commit changes, run the following command on the server (cronus)
- sudo htpasswd -m /etc/svn-auth-conf stokes
to add or remove files from svn logging
- svn add filename
- svn rm filename
- svn mv file1 file2
- svn cp file1 file2
- if you simply remove the file then svn will not commit those change
- if you modify a file that svn is already aware of, then these changes will be committed
- if you copy a new file into the repository, then you need to use "add" command to make svn aware of it
to make sure programs and scripts are executable
- svn propset svn:executable on [filename]
- you can use wildcards on the filename
- this applies to local directory, then commit your changes to the repository
- svn proplist http://cronus/repos/emip_distr/emip.py to check on current properties
to update local file with contents of the repository |