CheckMeta
Mercurial extension to enforce configurable file characteristics.
Contents
Status
This extension is not distributed with Mercurial.
Author: CipSoft GmbH
Repository: git://github.com/CipSoft-Components/checkmeta-mercurial.git
Web page: https://github.com/CipSoft-Components/checkmeta-mercurial
Overview
Checkmeta is an extension for mercurial that allows "meta" attributes to be set on files and verifies that the file adheres to those attributes.
For example you can specify that all .cpp files shall be ascii encoded and the extension will prevent any commit with non-ascii characters in .cpp files. You can also specify attributes as "mandatory" and the extension will disallow commits if one of the modified files doesn't have all mandatory attributes set.
Right now the following attributes are supported:
- encoding - specifies file encoding for the file(s). The name has to correspond to one of pythons standard encodings (see here) or "binary".
- mimetype - specifies a mime-type for the file(s). The only verification currently done for mime-types is that a text/something file can't contain non-printable characters (apart from whitespaces)
- bom - specifies if the file(s) must/can't have a unicode byte order mark.
- bmp - specifies that the file(s) can only contain characters from the unicode basic multilingual plane
Configuration
Configure your .hgrc to enable the extension by adding following lines:
[extensions] checkmeta=/path/to/checkmeta/checkmeta.py