Show More
@@ -169,7 +169,7 b' def addressencode(ui, address, charsets=' | |||||
169 | try: |
|
169 | try: | |
170 | acc, dom = addr.split('@') |
|
170 | acc, dom = addr.split('@') | |
171 | acc = acc.encode('ascii') |
|
171 | acc = acc.encode('ascii') | |
172 | dom = dom.encode('idna') |
|
172 | dom = dom.decode(encoding.encoding).encode('idna') | |
173 | addr = '%s@%s' % (acc, dom) |
|
173 | addr = '%s@%s' % (acc, dom) | |
174 | except UnicodeDecodeError: |
|
174 | except UnicodeDecodeError: | |
175 | raise util.Abort(_('invalid email address: %s') % addr) |
|
175 | raise util.Abort(_('invalid email address: %s') % addr) |
@@ -170,3 +170,10 b" hg email --date '1970-1-1 0:1' -n --flag" | |||||
170 | echo "% test multiple flags for multiple patches" |
|
170 | echo "% test multiple flags for multiple patches" | |
171 | hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ |
|
171 | hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ | |
172 | -c bar -s test -r 0:1 | fixheaders |
|
172 | -c bar -s test -r 0:1 | fixheaders | |
|
173 | ||||
|
174 | echo "% test multi-byte domain parsing" | |||
|
175 | UUML=`echo -en '\xfc'` | |||
|
176 | export HGENCODING=iso-8859-1 | |||
|
177 | hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" \ | |||
|
178 | -s test -r 0 | |||
|
179 | cat tmp.mbox | fixheaders |
@@ -1469,3 +1469,34 b' diff -r 8580ff50825a -r 97d72e5f12c7 b' | |||||
1469 | @@ -0,0 +1,1 @@ |
|
1469 | @@ -0,0 +1,1 @@ | |
1470 | +b |
|
1470 | +b | |
1471 |
|
1471 | |||
|
1472 | % test multi-byte domain parsing | |||
|
1473 | This patch series consists of 1 patches. | |||
|
1474 | ||||
|
1475 | ||||
|
1476 | Writing [PATCH] test ... | |||
|
1477 | From quux Tue Jan 1 00:01:01 1980 | |||
|
1478 | Content-Type: text/plain; charset="us-ascii" | |||
|
1479 | MIME-Version: 1.0 | |||
|
1480 | Content-Transfer-Encoding: 7bit | |||
|
1481 | Subject: [PATCH] test | |||
|
1482 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |||
|
1483 | Message-Id: <8580ff50825a50c8f716.315532860@ | |||
|
1484 | User-Agent: Mercurial-patchbomb | |||
|
1485 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |||
|
1486 | From: quux | |||
|
1487 | To: bar@xn--nicode-2ya.com | |||
|
1488 | ||||
|
1489 | # HG changeset patch | |||
|
1490 | # User test | |||
|
1491 | # Date 1 0 | |||
|
1492 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |||
|
1493 | # Parent 0000000000000000000000000000000000000000 | |||
|
1494 | a | |||
|
1495 | ||||
|
1496 | diff -r 000000000000 -r 8580ff50825a a | |||
|
1497 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
1498 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |||
|
1499 | @@ -0,0 +1,1 @@ | |||
|
1500 | +a | |||
|
1501 | ||||
|
1502 |
General Comments 0
You need to be logged in to leave comments.
Login now