mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
29 lines
674 B
Bash
Executable File
29 lines
674 B
Bash
Executable File
#!/bin/sh
|
|
|
|
hg init t
|
|
cd t
|
|
|
|
# we need a repo with some legacy latin-1 changesets
|
|
hg unbundle $TESTDIR/legacy-encoding.hg
|
|
hg co
|
|
|
|
echo % should fail with encoding error
|
|
echo "plain old ascii" > a
|
|
hg st
|
|
HGENCODING=ascii hg ci -m "`printf "ascii 0xe9: \xe9"`" -d "0 0"
|
|
|
|
echo % these should work
|
|
echo "latin-1" > a
|
|
HGENCODING=latin-1 hg ci -m "`printf "latin-1 e' encoded: \xe9"`" -d "0 0"
|
|
echo "utf-8" > a
|
|
HGENCODING=utf-8 hg ci -m "`printf "utf-8 e': \xc3\xa9"`" -d "0 0"
|
|
|
|
HGENCODING=latin-1 hg tag -d "0 0" "`printf "\xe9"`"
|
|
|
|
hg --encoding ascii log
|
|
hg --encoding latin-1 log
|
|
hg --encoding utf-8 log
|
|
HGENCODING=ascii hg tags
|
|
HGENCODING=latin-1 hg tags
|
|
HGENCODING=utf-8 hg tags
|