highlight: convert text to local before passing to pygmentize (
issue1341)
Example case:
Display file written in iso-8859-1 with current HGENCODING utf-8.
At the moment only an Error page appears because pygmentize
chokes on the replacement chars.
Alternatives:
1) Turn off highlighting and avoid UnicodeDecodeError
for files that are not in HGENCODING.
2) [this patch] use util.tolocal to display these files.
Alternative 2) seems ok, as this only concerns display and
readability.
See also:
fe38b0a3a928, apparently put aside during refactor of
highlight.
Add test for UnicodeDecodeError with iso-8859-1 file contents.
dirstate: always add times to map as integers
Fix bug spotted by Dov Feldstern
Take advantage of fstat calls clustering per directory if OS support it.
util module implements two versions of statfiles function
_statfiles calls lstat per file
_statfiles_clustered takes advantage of optimizations in osutil.c, stats all
files in directory at once when new directory is hit and caches the results
util.statfiles dispatches to appropriate version during module loading
The speedup on directory tree with 2k directories and 63k files is about
factor of 1.8 (1.3s -> 0.8s for hg diff - hg startup overhead about .2s)
At this point only Win32 now benefit from this patch.
Rest of OSes use the non clustered implementation.
Document email.charsets in hgrc.5
hgrc.5.ja.txt probably should include an example like:
[email]
charsets = iso-8859-1, iso-8859-15, windows-1252, iso-8859-2,
windows-1250, iso-2022-jp, iso-2022-jp-ms