D5769: tests: alter email `From` line to a value that's consistently parsed
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Jan 31 00:44:17 UTC 2019
durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Python2:
>>> email.header.decode_header('=?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog at debian.org>')
[('Rapha\xc3\xabl Hertzog', 'utf-8'), ('<hertzog at debian.org>', None)]
Python3:
>>> email.header.decode_header('=?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog at debian.org>')
[(b'Rapha\xc3\xabl Hertzog', 'utf-8'), (b' <hertzog at debian.org>', None)]
The good news is that extra ?= isn't required for the test, so we can
just dodge the inconsistency in header parsing.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5769
AFFECTED FILES
contrib/python3-whitelist
tests/test-import-git.t
CHANGE DETAILS
diff --git a/tests/test-import-git.t b/tests/test-import-git.t
--- a/tests/test-import-git.t
+++ b/tests/test-import-git.t
@@ -826,7 +826,7 @@
$ hg revert -qa
$ hg --encoding utf-8 import - <<EOF
- > From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog at debian.org>
+ > From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog <hertzog at debian.org>
> Subject: [PATCH] =?UTF-8?q?=C5=A7=E2=82=AC=C3=9F=E1=B9=AA?=
>
> diff --git a/a b/a
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -311,6 +311,7 @@
test-import-bypass.t
test-import-context.t
test-import-eol.t
+test-import-git.t
test-import-merge.t
test-import-unknown.t
test-import.t
To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list