[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: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-17 19:58:53 CEST

FWIW, I think I've tracked it down. Copying is a red herring here,
root directory isn't. Should have a patch soon.

--dave

On 10/17/07, Karl Fogel <kfogel@red-bean.com> wrote:
> "Ben Collins-Sussman" <sussman@red-bean.com> writes:
> > 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?
>
> Dmitry and I have already discussed that on the other list, yes :-).
>
> The reason I asked him to post here was because he's apparently seeing
> a bug that only manifests itself on FSFS. That's something we need to
> know about: it's not about Dmitry now, it's about Subversion.
>
> -Karl
>
> > 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 17 19:59:04 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.