D5206: contrib: tweak import-checker to always use bytes for module names
This revision was automatically updated to reflect the committed changes. Closed by commit rHG90517fad4293: contrib: tweak import-checker to always use bytes for module names (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5206?vs=12361=12383 REVISION DETAIL https://phab.mercurial-scm.org/D5206 AFFECTED FILES contrib/import-checker.py CHANGE DETAILS diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -696,7 +696,7 @@ if py or f.endswith('.t'): with open(f, 'rb') as src: for script, modname, t, line in embedded(f, modname, src): -yield script, modname, t, line +yield script, modname.encode('utf8'), t, line def main(argv): if len(argv) < 2 or (argv[1] == '-' and len(argv) > 2): To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5206: contrib: tweak import-checker to always use bytes for module names
durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We could go the other route and make embedded() return this as a bytes, but then it would be harder to portably doctest, so I prefer this option. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5206 AFFECTED FILES contrib/import-checker.py CHANGE DETAILS diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -696,7 +696,7 @@ if py or f.endswith('.t'): with open(f, 'rb') as src: for script, modname, t, line in embedded(f, modname, src): -yield script, modname, t, line +yield script, modname.encode('utf8'), t, line def main(argv): if len(argv) < 2 or (argv[1] == '-' and len(argv) > 2): To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel