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