recode text files in repo
Steve Fink
sphink at gmail.com
Tue Aug 27 23:53:50 UTC 2019
> Does anybody know how to configure "hg convert" to put all text files
> through "iconv -f KOI8-R -t UTF8" ?
No promises, but you could give this a try:
https://hg.sr.ht/~sfink/cmdconvert
Clone it to somewhere like ~/lib/hg. Add
[extensions]
cmdconvert = ~/lib/hg/cmdconvert
to your ~/.hgrc (or hgrc.ini or whatever it is on Windows.)
Then try running
hg convert --command 'iconv -f KOI8-R -t UTF8' your_repo new_repo
Odds of it working on the first try are somewhat low (I don't really
know what I'm doing.)
If you want to restrict by file extension, do something like
hg convert --ext .txt --ext .html --command 'iconv -f KOI8-R -t
UTF8' your_repo new_repo
It's not going to be fast, either.
More information about the Mercurial
mailing list