# HG changeset patch # User Augie Fackler # Date 1548347658 18000 # Node ID 5361f9ed8a30ef1adbfda254358f2a752cdf781f # Parent 671d5a7122375db318249724893d410c61a73525 py3: fix missing b prefixes in test-arbitraryfilectx.t Test passes on Python 3. # skip-blame b prefixes Differential Revision: https://phab.mercurial-scm.org/D5679 diff -r 671d5a712237 -r 5361f9ed8a30 contrib/python3-whitelist --- a/contrib/python3-whitelist Thu Jan 24 11:39:38 2019 -0500 +++ b/contrib/python3-whitelist Thu Jan 24 11:34:18 2019 -0500 @@ -14,6 +14,7 @@ test-ancestor.py test-annotate.py test-annotate.t +test-arbitraryfilectx.t test-archive-symlinks.t test-archive.t test-atomictempfile.py diff -r 671d5a712237 -r 5361f9ed8a30 tests/test-arbitraryfilectx.t --- a/tests/test-arbitraryfilectx.t Thu Jan 24 11:39:38 2019 -0500 +++ b/tests/test-arbitraryfilectx.t Thu Jan 24 11:34:18 2019 -0500 @@ -72,30 +72,30 @@ These files are different and should return True (different): (Note that filecmp.cmp's return semantics are inverted from ours, so we invert for simplicity): - $ hg eval "context.arbitraryfilectx('A', repo).cmp(repo[None]['real_A'])" + $ hg eval "context.arbitraryfilectx(b'A', repo).cmp(repo[None][b'real_A'])" True (no-eol) - $ hg eval "not filecmp.cmp('A', 'real_A')" + $ hg eval "not filecmp.cmp(b'A', b'real_A')" True (no-eol) These files are identical and should return False (same): - $ hg eval "context.arbitraryfilectx('A', repo).cmp(repo[None]['A'])" + $ hg eval "context.arbitraryfilectx(b'A', repo).cmp(repo[None][b'A'])" False (no-eol) - $ hg eval "context.arbitraryfilectx('A', repo).cmp(repo[None]['B'])" + $ hg eval "context.arbitraryfilectx(b'A', repo).cmp(repo[None][b'B'])" False (no-eol) - $ hg eval "not filecmp.cmp('A', 'B')" + $ hg eval "not filecmp.cmp(b'A', b'B')" False (no-eol) This comparison should also return False, since A and sym_A are substantially the same in the eyes of ``filectx.cmp``, which looks at data only. - $ hg eval "context.arbitraryfilectx('real_A', repo).cmp(repo[None]['sym_A'])" + $ hg eval "context.arbitraryfilectx(b'real_A', repo).cmp(repo[None][b'sym_A'])" False (no-eol) A naive use of filecmp on those two would wrongly return True, since it follows the symlink to "A", which has different contents. #if symlink - $ hg eval "not filecmp.cmp('real_A', 'sym_A')" + $ hg eval "not filecmp.cmp(b'real_A', b'sym_A')" True (no-eol) #else - $ hg eval "not filecmp.cmp('real_A', 'sym_A')" + $ hg eval "not filecmp.cmp(b'real_A', b'sym_A')" False (no-eol) #endif