[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: David Weintraub <qazwart_at_gmail.com>
Date: Sun, 21 Aug 2011 11:03:22 -0400

On Sun, Aug 21, 2011 at 9:02 AM, Andy Canfield <andy.canfield_at_pimco.mobi> wrote:
>>
>> If the file's timestamp didn't change, Subversion won't pick up the
>> change.
>
> So does this mean that if the file's timestamp does not change, but the
> files's contents change, Subversion will not pick up the changed contents;

Almost all version control systems look at the file's timestamp to
determine whether it was changed. This is also true of most build
systems such as Ant and Make.

The few file systems that don't look at the timestamp require you to
mark the file as edited before you can edit the file. These files
marked as edited will be picked up. Perforce does this and so does
ClearCase. Most developers don't like the extra step of marking a file
as edited before you can change it.

What Subversion does is look at the timestamp of the file and the
contents of the .svn directory that contains the file information. If
the timestamp has been touched, it is compared against the base to see
if there was an actual change. If you modify a file's property, it
changes an internal file in the .svn directory and Subversion picks up
that timestamp change.

Subversion cares about the files, their properties, but not their
system attributes. This is because such attributes vary from system to
system. Subversion can use properties (such as svn:executable) to mark
some system type attributes, but not all.

> I am having a similar problem now with directories that need to be globally
> readable. This happens because the repository contains a web site, and the
> user ('andy') who checks out the repository is not the user (Apache:
> www-data) who runs the PHP code. I have created scripts to handle this but
> the user has to remember to run the script every time he does a checkout.
> AFAIK there is no "svn:writable" property.

The way to solve this is to run an instance of Apache locally under
the user's home directory. That instance won't run under port 80, so
the user will have to run it on port 8080 and say
http://localhost:8080, but that's the only drawback. The user has full
control in starting and stopping Apache httpd and has full access to
the configuration.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2011-08-21 17:03:52 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.