Using TextMate for editing Subversion import/commit messages

Marqué :

Q: Is there a way to use TextMate for editing Subversion (svn) import/commit messages? If I set editor-cmd=mate in the subversion config file, TextMate correctly loads the temporary submit-message when doing a svn import/commit from command line, but svn returns directly with error "Log message unchanged or not specified". Subversion is not 'waiting' for TextMate to save or close the file.

--Armin Dressler

A: Try setting editor-cmd=mate -w (or you can set your environment EDITOR variable). This waits until the file is closed in TextMate. See also 'mate -help'.

Substitution de mots clefs dans Subversion

Subversion peut remplacer des mots clefs donnés dans un ou plusieurs fichiers lors du commit. C'est très pratique pour insérer dans les fichiers certaines informations. Les mots clefs suivants sont disponibles:

  • $Date$ : La date du commit.
  • $Revision$ : Le numéro de la révision où le fichier a été modifié pour la dernière fois.
  • $Author$ : Le nom de l'auteur de la modification.
  • $HeadURL$ : L'URL de la dernière version du fichier dans le dépôt Subversion.
  • $Id$ : Un résumé des mots-clefs ci-dessus.

Ajouter ces mots clefs à vos fichiers ne suffit pas. Il faut activer explicitement ce réglage. Pour un fichier donné cela se fait grâce à la ligne de commande:

svn propset svn:keywords "Date Author" mon-fichier.txt

Si vous souhaitez que certains mots clefs soient substituées dans tous les fichiers que vous ajoutez au dépôt, cela peut se configurer dans le fichier ${HOME}/subversion/config. Pour ce faire, votre fichier de configuration doit ressembler à :

[miscellany]
enable-auto-props = yes

[auto-props]
*.php = svn:keywords="Id Author Date"

Subversion Global Ignores

Marqué :

If you’re a Mac OS X user running Subversion on the command line and mounting remote disks you may have run into instances where you want to globally ignore ._*, .AppleDouble, and *:2e_* files. To do this simply open your Terminal and edit your ~/.subversion/config file and look for the line below.

#global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store

Uncomment it by removing the # and add the necessary additional exclusions and it will now look like this.

global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store ._* .AppleDouble *:2e_*

Save it and you’re all set. Now you won’t need to edit your svn:ignore property for every project!

I Want to Take You Higher

Feeling's gettin stronger
Music's gettin longer too
Music is flashin me
I want to take you higher
Baby baby baby light my fire


Boom shaka-laka-laka Boom shaka-laka-laka


Feeling's nitty-gritty
Sound is in the city too
Music's still flashin' me
Don't ya want to get higher
Baby baby baby light my fire.


Boom shaka-laka-laka Boom shaka-laka-laka


Higher!
Higher!
Higher!


C'mon light my fire
Want to take you higher


Boom shaka-laka-laka Boom shaka-laka-laka


Feeling that should make you move
Sounds that should help you groove
Music still flashin' me
Take your places
I want to take you higher
Baby baby baby light my fire.


Boom shaka-laka-laka Boom shaka-laka-laka


Higher!
Let's take you, do you wanna go, etc.


Boom shaka-laka-laka Boom shaka-laka-laka, Higher!


Boom shaka-laka-laka Boom shaka-laka-laka, Higher!


Boom shaka-laka-laka Boom shaka-laka-laka

Par Sly and The Family Stone @ Stand

Get SVN file revision

Marqué :

Get the revision of current checkout without the network hit of a call to svn log:

$ svn info | grep Revision | awk -- '{print $2}'
1234

Get the current version of the repo itself (hits the network):

$ svn info -r HEAD | grep Revision | awk -- '{print $2}'
1280