Como instalar subversion en Windows
Autor: Mario Hidalgo Martinez
Objetivo: Instalar un servidor de subversión en windows, como configurar los usuarios de subversion y crear un repositorio de codigo fuente para usarlo desde los entornos de desarrollo eclipse y netbeans.
Descripción: Cuando se desarrolla software con mas de dos personas es necesario tener un buen control de las versiones de código fuente, para realizar esta tarea existen muchas herramientas, pero las que son más usadas en entornos open source y empresariales son Subversion y CVS, en este caso vamos a ver la manera de montar un servidor de subversion en windows.
Paso 1. Instalar el servidor subversion en windows.
- Descargar el software de subversion para este manual usaremos la versión svn-win32-1.4.6.zip (En este manual se tomo el último release hasta el momento).
- Crear una carpeta donde se instalara el software, en la ruta que mas prefiera, para nuestro ejemplo vamos a descomprimir el archivo en C:\software\subversion.
- Extraer el contenido de la carpeta zip con el software de su preferencia.
- Una vez hecha la extracción del contenido de la carpeta zip deberá agregar la ruta de los archivos binarios al PATH de su PC. En caso de no tener privilegios para la modificación del PATH de toda la PC deberá crear una variable llamada PATH asociada a u su usuario.
Ejemplo: valor asignado al PATH: C:\software\subversion\svn-win32-1.4.6\bin, esto es para que pueda mandar a ejecutar los binarios de subversion desde la linea de comandos.
Si tiene dudas como configurar el PATH vea el video de la instalación de Java 6 en Windows
Paso 2. Verificar que ya esta instalado subversion
- Abra una ventana de Ms-Dos, Inicio -> Ejecutar -> cmd
Escriba el siguiente comando.
C:\Documents and Settings\893425> svn –version
svn, version 1.4.6 (r28521)
compiled Dec 20 2007, 16:19:22Copyright (C) 2000-2007 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).The following repository access (RA) modules are available:
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles ‘http’ scheme
- handles ‘https’ scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles ’svn’ scheme
* ra_local : Module for accessing a repository on local disk.
- handles ‘file’ scheme
Paso 3. Crear un repositorio
Vamos a suponer que el repositorio de codigo lo deseamos crear en C:repository, bien ahora ejecutamos el siguiente comando:
C:Documents and Settings\893425>svnadmin create “C:\repository”
Es importante recalcar que las comillas no deben omitirse.
Con este comando se tiene creado el repositorio de subversión, el contenido de repository se muestra en la siguiente imagen.

Paso 4. Configurar Usuarios del servidor Subversion
Necesita abrir el archivo C:\repository\conf\passwd, el contenido del archivo es similar al siguiente:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.[users]
# harry = harryssecret
# sally = sallyssecret
Mi configuracion de usuarios es la siguiente, la primera fila indica el nombre de usuario despues del signo = viene el pasword.
[users]
893425 = dism
893791 = cugts
894935 = abi
892264 = hugo
896264 = 123
Paso 5. Configuracion del servidor
Ahora necesita abrir el archivo C:\repository\conf\svnserve.conf, el contenido actual de este archivo es el siguiente:
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are “write”, “read”,
### and “none”. The sample settings below are the defaults.
# anon-access = read
# auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file’s location is relative to the conf directory.
### Uncomment the line below to use the default password file.
# password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file’s location is relative to the conf
### directory. If you don’t specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository’s uuid.
# realm = My First Repository
En este archivo se indica como se comportara el demonio de subversion.
Descomente las lineas:
anon-access = read
auth-access = write
password-db = passwd
Asi quedaría el archivo, C:\repository\conf\svnserve.conf
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are “write”, “read”,
### and “none”. The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file’s location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file’s location is relative to the conf
### directory. If you don’t specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository’s uuid.
# realm = My First Repository
Paso 6. Iniciar el servidor
Ya solo resta arrancar el servidor para realizar esto lance el comando:
C:\Documents and Settings\893425>svnserve –daemon –root “c:\repository”
Si no sale ningun error en la consola, el servidor de subversion ya se encuentra configurado adecuadamente.
Si tienen alguna duda o comentario estoy a sus ordenes.
Tal vez te interese conocer como usar subversion en eclipse
Hola,
Los quiero felicitar por la buena pagina que tienen ,es de mucha ayuda para las personas que no sabes usar este tipo de controlador de versiones, lo hacen ver muy facil.
Saludos.