Show More
@@ -172,6 +172,7 b' test-largefiles-cache.t' | |||
|
172 | 172 | test-largefiles-small-disk.t |
|
173 | 173 | test-locate.t |
|
174 | 174 | test-lock-badness.t |
|
175 | test-log.t | |
|
175 | 176 | test-logexchange.t |
|
176 | 177 | test-lrucachedict.py |
|
177 | 178 | test-mactext.t |
@@ -2016,33 +2016,31 b' test -u/-k for problematic encoding' | |||
|
2016 | 2016 | $ hg init problematicencoding |
|
2017 | 2017 | $ cd problematicencoding |
|
2018 | 2018 | |
|
2019 | $ $PYTHON > setup.sh <<EOF | |
|
2020 |
|
|
|
2021 |
|
|
|
2022 |
|
|
|
2023 |
|
|
|
2024 |
|
|
|
2025 |
|
|
|
2026 |
|
|
|
2027 |
|
|
|
2028 |
|
|
|
2029 |
|
|
|
2030 |
|
|
|
2031 | > EOF | |
|
2019 | >>> with open('setup.sh', 'wb') as f: | |
|
2020 | ... f.write(u''' | |
|
2021 | ... echo a > text | |
|
2022 | ... hg add text | |
|
2023 | ... hg --encoding utf-8 commit -u '\u30A2' -m none | |
|
2024 | ... echo b > text | |
|
2025 | ... hg --encoding utf-8 commit -u '\u30C2' -m none | |
|
2026 | ... echo c > text | |
|
2027 | ... hg --encoding utf-8 commit -u none -m '\u30A2' | |
|
2028 | ... echo d > text | |
|
2029 | ... hg --encoding utf-8 commit -u none -m '\u30C2' | |
|
2030 | ... '''.encode('utf-8')) and None | |
|
2032 | 2031 | $ sh < setup.sh |
|
2033 | 2032 | |
|
2034 | 2033 | test in problematic encoding |
|
2035 | $ $PYTHON > test.sh <<EOF | |
|
2036 |
|
|
|
2037 |
|
|
|
2038 |
|
|
|
2039 |
|
|
|
2040 |
|
|
|
2041 |
|
|
|
2042 |
|
|
|
2043 |
|
|
|
2044 |
|
|
|
2045 | > EOF | |
|
2034 | >>> with open('test.sh', 'wb') as f: | |
|
2035 | ... f.write(u''' | |
|
2036 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' | |
|
2037 | ... echo ==== | |
|
2038 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' | |
|
2039 | ... echo ==== | |
|
2040 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' | |
|
2041 | ... echo ==== | |
|
2042 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' | |
|
2043 | ... '''.encode('cp932')) and None | |
|
2046 | 2044 | $ sh < test.sh |
|
2047 | 2045 | 0 |
|
2048 | 2046 | ==== |
@@ -2255,14 +2253,14 b' Check that adding an arbitrary name show' | |||
|
2255 | 2253 | > from mercurial import namespaces |
|
2256 | 2254 | > |
|
2257 | 2255 | > def reposetup(ui, repo): |
|
2258 | > foo = {'foo': repo[0].node()} | |
|
2256 | > foo = {b'foo': repo[0].node()} | |
|
2259 | 2257 | > names = lambda r: foo.keys() |
|
2260 | 2258 | > namemap = lambda r, name: foo.get(name) |
|
2261 | 2259 | > nodemap = lambda r, node: [name for name, n in foo.items() |
|
2262 | 2260 | > if n == node] |
|
2263 | 2261 | > ns = namespaces.namespace( |
|
2264 | > "bars", templatename="bar", logname="barlog", | |
|
2265 | > colorname="barcolor", listnames=names, namemap=namemap, | |
|
2262 | > b"bars", templatename=b"bar", logname=b"barlog", | |
|
2263 | > colorname=b"barcolor", listnames=names, namemap=namemap, | |
|
2266 | 2264 | > nodemap=nodemap) |
|
2267 | 2265 | > |
|
2268 | 2266 | > repo.names.addnamespace(ns) |
General Comments 0
You need to be logged in to leave comments.
Login now