[darcs-users] File/Directory Metadata
silverdirk at conserv.silverdirk.com
Thu Nov 11 01:38:09 UTC 2004
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.
In a patch, the flags might look like:
| addfile ./foo
| hunk ./foo 1
| + blah
| + blah
| setmeta ./foo lines=logical watchunixperm=y
The "Map" of meta tags would essentially be versioned like everything
else, except that it wouldn't need a context. Conflicts would occour
when a meta tag was assigned conflicting values by parallel patches.
Also "Unassigned" would be considered a value, in the sense that if
a flag were set by one patch and unset by another, that counts as a
For the user interface, the tags could be added at add-time:
$ darcs add --lines=logical --charset=UTF-8 --unixperm foo
and altered later:
$ darcs setmeta unixperm= foo //un-sets the "unixperm" meta tag on foo
More information about the darcs-users