[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: inconsistent behavior when changing property from pre-commit script

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2007-10-17 15:42:49 CEST

Just a side question: did you not see the giant warnings in both the
book and in the pre-commit template to NOT change a pending txn from
the pre-commit script?

On 10/17/07, Dmitry Konyshev <dmitry.konyshev@gmail.com> wrote:
> Hello,
>
> I've posted this issue description in the users list and Karl Fogel
> advised me to post it here as well.
>
> The problem I encountered is as follows: during every commit, I change a
> property of all files in a repos in the pre-commit script within the
> current transaction. This works quite well, except for the case when a
> top-most directory is copied to root of the repos. In this case the
> property is only updated for the files in the new directory and stays
> the same for all other files.
>
> I can only reproduce this issue with the FSFS back-end.
>
> The sequence of reproducing this issue:
>
> 1. Create a FSFS-based repos, set up the attached script as a pre-commit
> script:
>
> $ svnadmin create --fs-type=fsfs tmprepos
> $ cp test.py tmprepos/hooks/pre-commit
> $ chmod +x tmprepos/hooks/pre-commit
>
> 2. Checkout the repos, create a directory and put a file there:
>
> $ svn co file:///tmp/tmprepos/ wc
> $ svn mkdir wc/dir1
> $ echo test > wc/dir1/file1
> $ svn add wc/dir1/file1
> $ svn ci -m "" wc
>
> 3. Find out the file's 'count' property:
>
> $ svn propget count file:///tmp/tmprepos/dir1/file1
> 1
>
> 4. Copy the directory and check the 'count' property of old and new
> files (check out that ):
>
> $ svn cp file:///tmp/tmprepos/dir1 file:///tmp/tmprepos/dir2 -m ""
> $ svn propget count file:///tmp/tmprepos/dir1/file1
> 1
> $ svn propget count file:///tmp/tmprepos/dir2/file1
> 2
>
> I tried different scenarios (changing files, file's properties, copying
> directories inside other directories, and so on) and it looks like that
> only copying the top-most directory to root reveals this effect. Also,
> the property of files in other directories don't get updated too.
>
> I'm also attaching a shell script with all the commands to reproduce the
> issue.
>
> Regards,
> Dmitry
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 17 15:43:00 2007

This is an archived mail posted to the Subversion Dev mailing list.