>
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
-----Original Message-----
> From: Stefan Sperling [mailto:stsp_at_elego.de]
> Sent: 16 April 2010 08:52
> To: Yann Crueghe
> Cc: users_at_subversion.apache.org
> Subject: Re: SVN MOVE don't perform a delete in some case
>
> On Fri, Apr 16, 2010 at 09:40:34AM +0200, Yann Crueghe wrote:
> > Hi !
>
> Hi!
>
> > *Test 1 : Try to rename a directory BRANCHE to BRANCHE_1*
> >
> > *Command :*
> > svn move --message "Rename BRANCHE to BRANCHE_1"
> >
> http://tetris.agora.msanet:16060/svn/METIER/y78amodifier/branches/BRAN
> > CHE
> >
> http://tetris.agora.msanet:16060/svn/METIER/y78amodifier/branches/BRAN
> > CHE_1
> >
> > *Hook params :*
> > D y78amodifier/branches/BRANCHE/
> >
> > *Command result : * A repository hook failed
> > svn: Commit blocked by pre-commit hook (exit code 1) with output:
> > It's not allowed to rename or delete a branch.
> >
> >
> > *Test 2 : Try to rename a directory BRANCHE to BRANCH*
> >
> > *Command :*
> > svn move --message "Rename BRANCHE to BR"
> >
> http://tetris.agora.msanet:16060/svn/METIER/y78amodifier/branches/BRAN
> > CHE
> > http://tetris.agora.msanet:16060/svn/METIER/y78amodifier/branches/BR
> >
> > *Hook params :*
> > A y78amodifier/branches/BRANCH/
> >
> > *Command result : * Commit done without error.
> >
> > Do you think it's a bug ?
>
> I don't know. On the surface this looks like a bug, but we
> need to find out what the real problem is. For that, you'll
> need to help others reproduce this problem on their own machines.
>
> Can you try to show a list of commands that starts by
> creating an empty repository, imports some files or folders,
> installs the hook script, and then runs some svn commands to
> trigger the problem?
>
I should see the whole pre-commit hook but I think you parse the list of files being committed and rely on some kind of order, e.g. the deletion being the first of the list.
I had a similar situation and I found out that (and this is documented) you can not rely on the order of the output of svnlook changed (or any other commands for that matter).
So, I think you will have to parse the whole list of files and if there is a delete then exit with an error.
Again, this is just hypothetical, as I don't know your pre-commit hook.
G
Received on 2010-04-16 10:55:19 CEST