File meta data in Mercurial repository
Risto Kankkunen
risto.kankkunen at gmail.com
Thu Aug 14 23:14:10 UTC 2008
There seems to be a file meta data field in Mercurial repository format (I'm
looking at filelog._readmeta). Is this something that extensions are free to use?
I think it could be used for many useful things. E.g. labeling files
mergeable/non-mergeable instead of relying on lame heuristics that could change
their mind during any revision.
But instead of just labeling whether a file is mergeable, it would be more
useful to record their MIME content type. This way I can configure Mercurial to
only merge certain content types, no matter what the file extension or the first
4KB of the file happens to be. And I could label UTF-16LE files as such so that
they are not mistaken as binary files and can be correctly merged. This is of
course all optional, if you are happy with the current heuristics, don't apply
any content type labels.
This same thing could be used to specify file name character encoding, as
discussed in the other thread in the general Mercurial mailing list.
There would need to be commands to set these properties, but obviously not any
arbitrary meta data field can be changed if it could create inconsistencies
(e.g. the "copy" field). Should there be some kind of a convention how to name
user-editable meta data?
Comments?
More information about the Mercurial-devel
mailing list