Sunday, August 29, 2010

SVN SubVersion - Versionamento de Conteúdo

Ubuntu 10:04
SVN Subversion
RapidSVN 00:12


Status:
  • 20111217 Acscentado procedimento de backup e restore entre servidores SVN.
  • Running SVN Server (svnserve -d -r /home/marcus/svn - dentro de /etc/init.d/rc.local)
  • SVN Client RapidSVN to svn: / / javasoftware.com.br.
ToDo:
  • See the possibility of using SVN for versioning the content of resources. A first level "cache" of the previous values of the state of a resource are maintained in the table (tbl_recursos - id: long and state: text) DBMS. The idea is to create a permanent repository for data, where they are stored in an optimized way to occupy little space for media.
  • View integration python-subversion.

Info:

SVN Server installation:
  • sudo aptitude install subversion

SVN clients:
  • sudo aptitude install RapidSVN - RapidSVN (Docs) (Linux or Windows)
  • Tortoise (Windows)

Linha de comando:
  • // Instalar o servidor SVN no LINUX pelo Gerenciador de Pacotes

  • // Criando repositório:
  • - mkdir /opt/snv_repo
  • - svnadmin create /opt/snv_repo

  • // Importando os dados iniciais:
  • - svn import ~/temp/first_project file://opt/snv_repo/trunk/first_project -m "initial import"
  • // Checkout
  • - svn checkout svn://localhost/trunk/first_project first_project

  • // Configurando o autostart:
  • ??? /etc/inetd.conf ???

  • // Configurar o acesso nos arquivos passwd e svnserve.conf
  • // arquivo /opt/svn_repo/conf/svnserve.conf
  • [general]
  • anon-access = none
  • auth-access = write
  • password-db = passwd
  • realm = Repositorio Modelo
  • // arquivo /opt/svn_repo/conf/passwd
  • [users]
  • marcus = 123

  • // Start o Subversion Server
  • // Startar como deamon.
  • - svnserve -d -r /opt/svn_repo
  • // Startar de modo automatico.
  • - svnserve -i
  • - e alterar o /etc/inetd.conf colocando o repositorio.

  • // Conecte ao repositório:
  • - svn://localhost/

  • // Backup e restore em servidores diferentes.
  • svnadmin dump /path/to/repository > repo_name.svn_dump
  • svnadmin create /path/to/repository
  • svnadmin load /path/to/repository < repo_name.svn_dump

  • // Import de um repositório SVN existente para outro servidor (eg GoogleCode)
  • // Google Code repository must be reset to revision 0.
  • svnsync init --username YOURUSERNAME https://YOURPROJECT.googlecode.com/svn file:///path/to/localrepos
  • svnsync sync --username YOURUSERNAME https://YOURPROJECT.googlecode.com/svn

  • // Mudar IP do servidor SVN na workcopy.
  • svn switch --relocate svn://OLD.IP.ADDR svn://NEW.IP.ADDR

Links: