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

Re: svn and shell scripts: managing properties

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-03-12 13:29:47 CET

On Mar 12, 2006, at 05:37, Kalin KOZHUHAROV wrote:

>> The fact that Subversion doesn't notice differences if the
>> modification
>> occurs within the same second has come up on the list before. For
>> example:
>>
>> http://svn.haxx.se/users/archive-2005-03/0783.shtml
>>
>> I searched http://svn.haxx.se/users for "one second"; there were
>> other
>> results.
>
> OK, I kind of missed most of this thread, but this behavior is a
> bug, right?
>
>>>> svn propedit myproperty --editor-cmd "sed -i -e 's/foo/bar/g'"
>>>> mypath
>>>> then svn will respond: "No changes to property 'myproperty' on
>>>> 'mypath'".
>
> I couldn't find any related issues in the issue tracker, are there
> any?
> Or why is it a WONTFIX bug?

There was some other discussion about this on the users list in 2005
which I cannot find at the moment; the proper search terms elude me.
I believe it boiled down to the only way to avoid this problem would
be for Subversion to actually check the files' entire contents every
time, which would be way too slow to be usable, and so this
compromise was reached that the mtime and/or file size are checked
first. According to this developer discussion from last month...

http://svn.haxx.se/dev/archive-2006-02/1034.shtml

...the algorithm currently is:

if (timestamp is same)
        return not_modified;
else if (size differs)
        return modified;
else
        go_into_expensive_further_investigation();

See also other parts of that discussion, like:

http://svn.haxx.se/dev/archive-2006-02/1092.shtml

I did also find this developer discussion from late 2002 suggesting
that the current behavior was fine but just needed to be documented
better:

http://svn.haxx.se/dev/archive-2002-11/1065.shtml

> So far the ugly workaround seems:
>>> using a combination of propdel and propset now. Quite ugly but it
>>> works.

Not sure why that works... the workaround would seem to be for your
script to sleep for 1 second between operations to ensure that the
timestamp is different.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Mar 12 13:31:20 2006

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