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

Re: Bug in Subversion regarding file attributes

From: Andy Levy <andy.levy_at_gmail.com>
Date: Sun, 21 Aug 2011 07:48:12 -0400

On Sun, Aug 21, 2011 at 07:21, Andy Canfield <andy.canfield_at_pimco.mobi> wrote:
> I created a repository and created a subdirectory in it named 'scripts'. In
> this are a half-dozen Linux shell scripts. Unfortunately, I set the execute
> flag on only five of them; the sixth was untested as of my first commit so I
> had never noticed that the execute attribute was unset.
>
> [1] I set the execute attribute and did a commit, but the file was not
> updated in the repository. Apparently the change in atributes was not
> recognized as a file change by Subversion.

If the file's timestamp didn't change, Subversion won't pick up the change.

> [2] I touched the file - I touched ALL the files in scripts, and none of
> them was updated on the commit. Apparently the file timestamp change was not
> taken as a file change by Subversion. OK, Subversion is not storing
> timestamps.

If a change in the timestamp is detected, a checksum is done against
each file's pristine copy (and properties). If the checksums &
properties match, Subversion doesn't flag the file as changed.

> [3] I edited the file, and this was taken as an update by Subversion. I just
> added a blank line to the end of it. But note that the file attributes now
> include the execute flag. I did another checkout, and unfortunately the
> execute flag is STILL not set.
>
> In my humble opinion [1] and [3] should have resulted in the file attributes
> stored in the repository being changed.

I disagree on #1, but for #3 I think it's only picked up when you Add the file.

> So I did an svn delete for that file, then a commit. I restored the file
> from a backup, set the attributes, did an svn add for that file, then a
> commit. Went to another directory and did an svn checkout. OK; now the
> attributes are correct.

You could have also set the svn:executable property on the file. If
you look at your newly-added copy of the file, you'll see that
property set now.
Received on 2011-08-21 13:49:31 CEST

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

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