[darcs-users] File/Directory Metadata
droundy at abridgegame.org
Sat Nov 13 12:54:57 UTC 2004
On Wed, Nov 10, 2004 at 08:38:09PM -0500, Michael Conrad wrote:
> I've been giving some thought to the whole discussion generated about the
> line endings, and got thinking that maybe what darcs needs next is some
> name=value type metadata associated with each file.
> This would solve a number of things:
> * for the line endings issue, tags like "lines=logical" or "lines=linux"
> could be added on a per-file basis.
> * for permissions, tags like "unixperm=rwxr-xr-x" could solve the issues
> with preserving permissions, and maybe another one like "watchunixperm"
> that would cause darcs to auto-record changes to the permissions.
> * for character encoding, tags could be "charset=UTF-8", etc.
> Ideas? Comments?
Not necesarily a bad idea, but opens up a number of cans of worms. Any
"meta" value that causes darcs to do something (which I guess is all but
the charset one, in your examples) will need to have very well-defined
behavior (and unchangeable--we can't fix bugs in it).
Permissions is an example that would be probably a mistake to implement.
It doesn't really make sense to keep track of any permissions but +/- x.
"Group" and "others" permissions will vary from machine to machine (at
least, their meaning varies from machine to machine). Disallowing write
permissions in a darcs repository somehow just doesn't make sense, and of
course disallowing read permissions would cause darcs to fail (unless it
changed the permissions and then back again, which starts getting silly).
There are some users who would like to have full unix permissions
versioning, but this is restricted to those using darcs for "unusual"
things like managing their .ssh/ directory. We don't want to penalize the
normal users to help out others.
In short, I don't think we really need arbitrary file metadata. The only
real appeal it has is that one can use it to "easily" implement ill-advised
or poorly-thought-out features. Metadata as "pure" metadata wouldn't be
bad (i.e. metadata that darcs keeps track of, but doesn't act upon), but
I'm not sure how it would be helpful, either.
(I hope I don't sound *too* negative... I'm a bit tired.)
More information about the darcs-users