[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: Dmitry Konyshev <dmitry.konyshev_at_gmail.com>
Date: 2007-10-17 16:30:15 CEST

Sure, I did :) The advantages of this approach for my task hugely
overweight the connected issue with inconsistency of the working copy.

Another reason I decided to speak up about this issue is that this might
be a symptom of a bigger problem. Some changes merely disappear from a
transaction, and it might very well happen that this relates not only to
changes made from the pre-commit script.

Regards,
Dmitry

Ben Collins-Sussman wrote:
> 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
>>
>>
>>
>>
>
>
Received on Wed Oct 17 16:30:45 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.