You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bogdan Cristea <cr...@gmail.com> on 2008/10/07 10:38:57 UTC

Post commit hook when a new tag is created

    I am trying to write a simple post-commit hook so that each time a tag 
version of our project is created an e-mail is automatically send and an 
archive should be created with all files from this tag. Our repository has 
three folders, trunk, tags, branches. While the task of sending an e-mail 
every time a commit is made is straightforward, in my case I need more 
specific actions:
 
1. call the hook script only when a new tag is created in the tags folder
2. create an archive containing only the project structure (folders and files) 
as saved in the tagged version

hot-backup.py script does create an archive, but the entire repository is 
saved, including files generated by svnadmin. Viewvc has this feature, of 
creating an archive from a selected version, but I don't know how to use that 
feature in my script.

Any help would be greatly appreciated.

regards
-- 
Bogdan Cristea
software engineer
Sytron Technologies Overseas
www.sytron.ro

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

Re: Post commit hook when a new tag is created

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 7, 2008, at 05:38, Bogdan Cristea wrote:

>     I am trying to write a simple post-commit hook so that each  
> time a tag
> version of our project is created an e-mail is automatically send  
> and an
> archive should be created with all files from this tag. Our  
> repository has
> three folders, trunk, tags, branches. While the task of sending an  
> e-mail
> every time a commit is made is straightforward, in my case I need more
> specific actions:
>
> 1. call the hook script only when a new tag is created in the tags  
> folder
> 2. create an archive containing only the project structure (folders  
> and files)
> as saved in the tagged version

This is not hard to do. The hook script will be called every time any  
commit is made, but in it you can run "svnlook dirs-changed" to see  
if the tags directory is one that was changed, and only do your  
emailing and archiving then.


> hot-backup.py script does create an archive, but the entire  
> repository is
> saved, including files generated by svnadmin. Viewvc has this  
> feature, of
> creating an archive from a selected version, but I don't know how  
> to use that
> feature in my script.



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