recode text files in repo
Victor Sudakov
vas at mpeks.tomsk.su
Tue Aug 27 12:17:27 UTC 2019
Victor Sudakov wrote:
> Steve Fink wrote:
> > One way would be `hg convert` with a custom conversion script. See the
> > "Customization" example at the bottom of
> > <https://www.mercurial-scm.org/wiki/ConvertExtension>. It looks like
> > you could override only getfile(), and make it return modified data.
>
> That would require coding, sounds a bit complicated.
>
> I was thinking of "hg export" to a text file (or a set of files) under
> ru_RU.KOI8-R locale, processing them with recode/iconv/etc and importing
> them (into a different repo) under the ru_RU.UTF-8 locale. Will that
> work?
It does not. It turned out that the result of "hg export" cannot be
easily "hg import"-ed, because "hg import" tries to commit and generates
errors.
"bundle | unbundle" works, but a bundle (even uncompressed) is binary
and cannot be recoded.
Please help.
Does anybody know how to configure "hg convert" to put all text files
through "iconv -f KOI8-R -t UTF8" ?
--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
More information about the Mercurial
mailing list