RE: SVN MOVE don't perform a delete in some case
From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Fri, 16 Apr 2010 10:36:47 +0100
Please do not top-post or post in HTML
Now, scroll down for my response
Linedata Services (UK) Ltd
________________________________
From: ext_crueghe.yann_at_agora.msa.fr [mailto:ext_crueghe.yann_at_agora.msa.fr]
Hi !
Thank you very much for your quick replies !
ie : myapp /branches/my_branch/myfile.txt
The hook must block the user when he want to delete or rename /branches/my_branch
The hook work when i try to delete the directory
Here is a partial copy of the hook (light from the original which control more things)
I prepare the svn commands to reproduce this comportment ASAP
Thank you very much
# sortie en erreur
# sortie ok
# parametres d'appels du hook
# Binaires et fichiers de configuration du serveur SVN
# Constantes
# extraction de l'action et de la ressource cible
# extraction du repertoire impacte par le commit
# Securisation des branches
exit_success
This does exacttly what I thought. Svnlook change will return a list of files, but your 'set' command will set $1 and $2 based on the first. In the case you report where this pre-commit hook does not work, svnlook return the addition first, so you set $1 to A and $2 to '/branches/my_bra' and that's why your script does not work.
You need a loop to go through the output from svnlook. I use something like this
$SVNLOOK changed --revision $REVISION $REPOS_PATH | $AWK '{OFS=";"; print $1,$2}' > $TMPDIR/changes_list
G
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.