You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "MALCOR, Claire" <cl...@astrium.eads.net> on 2006/07/07 11:56:33 UTC

How to modify a meta-data in pre-commit hook

Hello, 

I have installed SubVersion recently, and I try to develop a script in python with libsvn module.

I want to have this feature : 

$> svn co file
-> execution of the pre-commit hook
-> execution of the python script, and modification of the file meta - 
-> data 'FM' Commit completed

The script is executed by the pre-commit hook, but I don't know how to modify the meta-data. And the problem is that the commited file is locked by the commit action.

My configuration : 
SubVersion 1.3.1
Python 2.3 bindings
Windows XP :'(

Which functions of the python bindings can do that?
Does anyone can help me?

Thx

Claire



---------------------------------------------------------

CE COURRIER ELECTRONIQUE EST A USAGE STRICTEMENT INFORMATIF ET NE SAURAIT ENGAGER DE QUELQUE MANIERE QUE CE SOIT EADS ASTRIUM SAS, NI SES FILIALES.

SI UNE ERREUR DE TRANSMISSION OU UNE ADRESSE ERRONEE A MAL DIRIGE CE COURRIER, MERCI D'EN INFORMER L'EXPEDITEUR EN LUI FAISANT UNE REPONSE PAR COURRIER ELECTRONIQUE DES RECEPTION. SI VOUS N'ETES PAS LE DESTINATAIRE DE CE COURRIER, VOUS NE DEVEZ PAS L'UTILISER, LE CONSERVER, EN FAIRE ETAT, LE DISTRIBUER, LE COPIER, L'IMPRIMER OU EN REVELER LE CONTENU A UNE TIERCE PARTIE.



This email is for information only and will not bind EADS Astrium SAS in any contract or obligation, nor its subsidiaries.

If you have received it in error, please notify the sender by return email. If you are not the addressee of this email, you must not use, keep, disseminate, copy, print or otherwise deal with it.

---------------------------------------------------------

Re: How to modify a meta-data in pre-commit hook

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 7, 2006, at 13:56, MALCOR, Claire wrote:

> I have installed SubVersion recently, and I try to develop a script  
> in python with libsvn module.
>
> I want to have this feature :
>
> $> svn co file
> -> execution of the pre-commit hook
> -> execution of the python script, and modification of the file meta -
> -> data 'FM' Commit completed

I assume you meant "svn ci file" and not "svn co file"


> The script is executed by the pre-commit hook, but I don't know how  
> to modify the meta-data. And the problem is that the commited file  
> is locked by the commit action.
>
> My configuration :
> SubVersion 1.3.1
> Python 2.3 bindings
> Windows XP :'(

What meta-data are you trying to modify? Are you talking about  
revision properties, like svn:author, svn:date, svn:log, etc.? If so,  
that's fine, but you must not attempt to modify file contents or  
versioned properties like svn:eol-style or svn:mime-type because the  
working copy would then be out of sync with the repository and the wc  
would most likely break in mysterious ways.

What does it mean when you say the committed file is locked by the  
commit action? Where is it locked? Are you talking about a Subversion  
lock, or something else?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org