Makefile it

Tuesday, November 25, 2008

Subversion and the tag $Id$

1. Subversion and the $Id$ keyword.

This file hopes to help you on the configuration of the subversion for updating the $Id$ keyword on the existing files and the new ones you will create.

1.1. Requirements
Having the subversion client installed.

1.2. Subversion Configuration
Edit your ~/.subversion/config and type something like this:

[miscellany]
...
enable-auto-props = yes

[auto-props]
*.java = svn:keywords=Id
*.cfg = svn:keywords=Id
*.sh = svn:keywords=Id
*.xml = svn:keywords=Id
*.txt = svn:keywords=Id
*.gnp = svn:keywords=Id

You can add at the end of the line, separated by blanks, other keywords: Rev Date Author

1.4. Commiting new files
The above configuration is sufficient for expanding the $Id$ tag. Nothing else is required. For committing changes already in Subversion where the tag is not expanded, see Section 1.5.

1.5. Committing Changes
Whenever you commit your changes to the subversion repository, the $Id$ field will be updated accordingly. You do NOT need to do anything else.

If you want to use the $Id$ tag in files already in Subversion, you need to do a step before committing your changes:

$ svn pset svn:keywords "Id"

or

$ svn -R pset svn:keywords "Id"

for set the keywork 'Id' on the given file, or directory. You can also use wildcards, like:

$ svn pset svn:keywords "Id" *.txt

or

$ svn pset svn:keywords "Id" src/*.java

to update the corresponding files by extension.


Example of expansion:
$Id: A_FILE.txt 61 2008-11-25 09:51:32Z jordi $

Labels: , , , , ,

Wednesday, November 05, 2008

Subversion per entorns restringits

Hola,

La necessitat et fa trobar coses: Entorn Paranoic.

Si no pots tenir accés Subversion per http, però tens accés SSH a un ordinador entre la gent que hi heu de treballar? Cap problema:

SERVER=Ordinador on hi pot accedir tothom i on hi estarà el repositori svn.
USERVER=El teu usuari a SERVER.
PATHSRV = Path absolut al repositori a SERVER.
LOCAL=El teu ordinador.
ULOCAL = El teu usuari a LOCAL.
PATHLCL = Path absolut al working copy a LOCAL.

  1. Crees un repositori a SERVER de la forma habitual:
    SERVER$ svnadmin create PATHSRV
    (Recorda't de crear els directoris trunk, tags i branches :-D)

  2. EnllaçCheck-out inicial:
    svn co svn+ssh://USERVER@SERVER/PATHSRV/trunk PATHLCL

  3. Commits:
    svn ci -m 'Your comment'
El únic inconvenient és que cada vegada que fas un checkout o un commit et demana el password dues vegades. La solució és importar-hi la teva clau pública al SERVER. D'això també n'hi ha molts tutorials. Aquí en tens un.

Fins la pròxima!

Labels: , , ,

Tuesday, November 04, 2008

Qui busca sempre troba

Qui busca sempre troba, això em deia la meva família. I és veritat! Ara hem trobava amb un problemeta de compartir codi font entre desenvolupadors, però no hi ha possibilitat d'usar un subversion via http. Renunciem al subversion? No!

Requisits: Accés SSH, Subversion instal·lat al server? Doncs ja en tens prou!

http://subversion.tigris.org/faq.html#paranoid

Jo no ho sabia, així que ho he volgut compartir!

Apa!!!

Labels: , ,