Show More
@@ -2217,9 +2217,9 b' Age filter:' | |||||
2217 |
|
2217 | |||
2218 | >>> from __future__ import absolute_import |
|
2218 | >>> from __future__ import absolute_import | |
2219 | >>> import datetime |
|
2219 | >>> import datetime | |
2220 | >>> fp = open('a', 'w') |
|
2220 | >>> fp = open('a', 'wb') | |
2221 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) |
|
2221 | >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7) | |
2222 | >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day)) |
|
2222 | >>> fp.write(b'%d-%d-%d 00:00' % (n.year, n.month, n.day)) | |
2223 | >>> fp.close() |
|
2223 | >>> fp.close() | |
2224 | $ hg add a |
|
2224 | $ hg add a | |
2225 | $ hg commit -m future -d "`cat a`" |
|
2225 | $ hg commit -m future -d "`cat a`" | |
@@ -4573,8 +4573,8 b' Set up repository for non-ascii encoding' | |||||
4573 | $ hg init nonascii |
|
4573 | $ hg init nonascii | |
4574 | $ cd nonascii |
|
4574 | $ cd nonascii | |
4575 | $ $PYTHON <<EOF |
|
4575 | $ $PYTHON <<EOF | |
4576 | > open('latin1', 'w').write('\xe9') |
|
4576 | > open('latin1', 'wb').write(b'\xe9') | |
4577 | > open('utf-8', 'w').write('\xc3\xa9') |
|
4577 | > open('utf-8', 'wb').write(b'\xc3\xa9') | |
4578 | > EOF |
|
4578 | > EOF | |
4579 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` |
|
4579 | $ HGENCODING=utf-8 hg branch -q `cat utf-8` | |
4580 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
|
4580 | $ HGENCODING=utf-8 hg ci -qAm "non-ascii branch: `cat utf-8`" utf-8 |
General Comments 0
You need to be logged in to leave comments.
Login now