[darcs-users] Re: File permissions versioning?

André Pang ozone at algorithm.com.au
Sat Jul 31 16:03:10 UTC 2004


On 30/07/2004, at 5:28 AM, Björn Lindström wrote:

> "Samuel A. Falvo II" <sam.falvo at falvotech.com> writes:
>
>> How will you handle the Windows and OS/2 platforms, where effectively
>> *ANY* file is potentially executable, there is no explicit way to tag
>> a file as executable, and where it is too easy to assume a file is
>> executable when you don't want it to be so on Linux, AmigaOS, etc?
>
> I don't know the best way to handle this, but it seems bad to not
> support it just because one supported platform is flawed in that 
> regard.
>
> Can anyone educate us on how revision control systems that support file
> permissions (Subversion?) handle this in Windows?

Subversion has a pretty nice 'properties' system.  Each file can have 
properties attached to them, which are simple key/value pairs.  (For 
Haskellers, the key/value is basically untyped: they're essentially 
just Strings, although one may prefer a more typeful design).  You can 
attach a property key named 'foo' with a value of 'bar' to any file in 
the repository.

The nice bit is that Subversion has some special key names, which the 
client uses to do special things: e.g. if the 'svn:executable' property 
exists for a file, Subversion will set the filesystem's executable bit 
for that file.  There are also a couple of other properties:

* svn:mime-type -- mainly used to determine whether a file is binary or 
not
* svn:ignore -- file glob patterns to ignore
* svn:keywords -- list of RCS-style $keywords$ to replace in the file, 
e.g. "Id LastChangedBy"
* svn:eol-style -- native/CRLF/LF/CR line-ending mappings
* svn:externals -- used to automatically checkout other Subversion 
repos in your own Subversion repo

I think the property system is very elegant: it's simple, easily 
extensible, and works well.  Having a similar system in darcs, for 
handling things such as whether a file is binary or not, EOL 
terminators, and executable bits, would be nice.


-- 
% Andre Pang : trust.in.love.to.save





More information about the darcs-users mailing list