equal
deleted
inserted
replaced
3545 Set up repository for non-ascii encoding tests: |
3545 Set up repository for non-ascii encoding tests: |
3546 |
3546 |
3547 $ hg init nonascii |
3547 $ hg init nonascii |
3548 $ cd nonascii |
3548 $ cd nonascii |
3549 $ python <<EOF |
3549 $ python <<EOF |
|
3550 > open('latin1', 'w').write('\xe9') |
3550 > open('utf-8', 'w').write('\xc3\xa9') |
3551 > open('utf-8', 'w').write('\xc3\xa9') |
3551 > EOF |
3552 > EOF |
3552 $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
3553 $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
3553 $ HGENCODING=utf-8 hg ci -qAm 'non-ascii branch' utf-8 |
3554 $ HGENCODING=utf-8 hg ci -qAm 'non-ascii branch' utf-8 |
3554 |
3555 |
3561 (not sure the current behavior is right; we might want to use utf-8b encoding?) |
3562 (not sure the current behavior is right; we might want to use utf-8b encoding?) |
3562 |
3563 |
3563 $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
3564 $ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1 |
3564 "\ufffd\ufffd" |
3565 "\ufffd\ufffd" |
3565 |
3566 |
|
3567 utf8 filter: |
|
3568 |
|
3569 $ HGENCODING=ascii hg log -T "round-trip: {branch|utf8|hex}\n" -r0 |
|
3570 round-trip: c3a9 |
|
3571 $ HGENCODING=latin1 hg log -T "decoded: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
3572 decoded: c3a9 |
|
3573 $ HGENCODING=ascii hg log -T "replaced: {'`cat latin1`'|utf8|hex}\n" -l1 |
|
3574 abort: decoding near * (glob) |
|
3575 [255] |
|
3576 $ hg log -T "invalid type: {rev|utf8}\n" -r0 |
|
3577 abort: template filter 'utf8' is not compatible with keyword 'rev' |
|
3578 [255] |
|
3579 |
3566 $ cd .. |
3580 $ cd .. |