HTTPS SSH - transcode commit log as 'cvslog' hook

This hook is used to transcode commit log at hg convert conversion from CVS repository.

You can use this hook via hook configuration in hgrc files like below:

cvslog = python:/path/to/

or via command line --config option like below:

--config hooks.cvslog=python:/path/to/

ENCODING specifies encoding name of original CVS commit log. It should be recognizable for Python: e.g. cp932, utf-8, and so on.

If ENCODING is comma separated list of encoding name, this hook tries to transcode each commit log by encoding from left to right in ENCODING list:


This allows to convert from the CVS repository mixing encodings in commit log.

But some strings (= byte sequences) are valid in some encodings: utf-8 string may be mis-recognized as cp932 string, for example.

So, please check order of encoding names, and result of conversion carefully: you can get internal transcoding information by hg convert invocation with --debug option.

Please see hg help convert for detail about conversion from CVS repository.