Diferencia entre revisiones de «Subversion»

De gacq wiki
Saltar a: navegación, buscar
(Página nueva: = Install and create a repository = <pre> aptitude install subversion subversion-tools mkdir /var/lib/svn svnadmin create /var/lib/svn/repo svn mkdir file:///var/lib/svn/repo/trunk ...)
 
(Servers (sample))
 
(No se muestran 6 ediciones intermedias del mismo usuario)
Línea 1: Línea 1:
 +
= Versioning config files using subversion =
 +
== Install and create a repository ==
 +
<pre>
 +
aptitude install subversion subversion-tools libapache2-svn
 +
mkdir /var/lib/svn
 +
svnadmin create /var/lib/svn/repo
 +
chown -R www-data:www-data /var/lib/svn/repo
 +
htpasswd -c /var/lib/svn/.passwd gacq
 +
</pre>
  
 +
;/etc/apache2/mods-enabled/dav_svn.conf
 +
<pre>
 +
<Location /repo>
 +
    DAV svn
 +
    SVNPath /var/lib/svn/repo
 +
    AuthType Basic
 +
    AuthName "Repositorio"
 +
    AuthUserFile /var/lib/svn/.passwd
 +
    <LimitExcept GET PROPFIND OPTIONS REPORT>
 +
        Require valid-user
 +
    </LimitExcept>
 +
</Location>
 +
</pre>
  
= Install and create a repository =
+
== Development servers (sample) ==
 
<pre>
 
<pre>
aptitude install subversion subversion-tools
+
# Checkout empty server repository
mkdir /var/lib/svn
+
cd /
svnadmin create /var/lib/svn/repo
+
svn co http://repository/repo/trunk/servername .
svn mkdir file:///var/lib/svn/repo/trunk -m "Trunk"
+
 
svn mkdir file:///var/lib/svn/repo/branches -m "Branches"
+
# Add /etc without subdirs
svn mkdir file:///var/lib/svn/repo/tags -m "Tags"
+
svn add --depth=empty etc
 +
 
 +
# Add cron.d, cron.daily, etc
 +
svn add etc/cron.*
 +
 
 +
# Add /etc/postfix and remove databases files
 +
svn add etc/postfix
 +
svn del --keep-local /kolab/etc/postfix/*.db
 +
 
 +
# Add another appl dir
 +
svn add --depth=empty appl
 +
svn add appl/conf
 +
 
 +
# Add local scripts
 +
svn add --depth=empty usr
 +
svn add --depth=empty usr/local
 +
svn add usr/local/bin
 
</pre>
 
</pre>

Revisión actual del 17:16 26 feb 2010

Versioning config files using subversion

Install and create a repository

aptitude install subversion subversion-tools libapache2-svn
mkdir /var/lib/svn
svnadmin create /var/lib/svn/repo
chown -R www-data:www-data /var/lib/svn/repo
htpasswd -c /var/lib/svn/.passwd gacq
/etc/apache2/mods-enabled/dav_svn.conf
<Location /repo>
    DAV svn
    SVNPath /var/lib/svn/repo
    AuthType Basic
    AuthName "Repositorio"
    AuthUserFile /var/lib/svn/.passwd
    <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
    </LimitExcept>
</Location>

Development servers (sample)

# Checkout empty server repository
cd /
svn co http://repository/repo/trunk/servername .

# Add /etc without subdirs
svn add --depth=empty etc

# Add cron.d, cron.daily, etc
svn add etc/cron.*

# Add /etc/postfix and remove databases files
svn add etc/postfix
svn del --keep-local /kolab/etc/postfix/*.db

# Add another appl dir
svn add --depth=empty appl
svn add appl/conf

# Add local scripts
svn add --depth=empty usr
svn add --depth=empty usr/local
svn add usr/local/bin