[PATCH 4 of 5] py3: journal: namedtuple takes unicode
Mateusz Kwapich
mitrandir at fb.com
Sun Oct 9 09:55:11 EDT 2016
# HG changeset patch
# User Mateusz Kwapich <mitrandir at fb.com>
# Date 1476021128 25200
# Sun Oct 09 06:52:08 2016 -0700
# Node ID 09060ee32a5cd51cdcfa42b23312ca17a11fc713
# Parent dd705da68bdc7e52ca7a06e92e0fb6e74af6647b
py3: journal: namedtuple takes unicode
consistent namedtuple usage in changelog.py:141
diff --git a/hgext/journal.py b/hgext/journal.py
--- a/hgext/journal.py
+++ b/hgext/journal.py
@@ -177,8 +177,8 @@ def unsharejournal(orig, ui, repo, repop
return orig(ui, repo, repopath)
class journalentry(collections.namedtuple(
- 'journalentry',
- 'timestamp user command namespace name oldhashes newhashes')):
+ u'journalentry',
+ u'timestamp user command namespace name oldhashes newhashes')):
"""Individual journal entry
* timestamp: a mercurial (time, timezone) tuple
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -22,7 +22,6 @@
hgext/fsmonitor/pywatchman/capabilities.py: error importing: <SyntaxError> invalid or missing encoding declaration (error at __init__.py:*)
hgext/fsmonitor/pywatchman/pybser.py: error importing: <SyntaxError> invalid or missing encoding declaration (error at __init__.py:*)
hgext/fsmonitor/watchmanclient.py: error importing: <SyntaxError> invalid or missing encoding declaration (error at __init__.py:*)
- hgext/journal.py: error importing: <ValueError> Type names and field names must be valid identifiers: "b'journalentry'" (error at journal.py:*)
hgext/largefiles/basestore.py: error importing: <SyntaxError> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)
hgext/largefiles/lfcommands.py: error importing: <SyntaxError> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)
hgext/largefiles/lfutil.py: error importing: <SyntaxError> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)
More information about the Mercurial-devel
mailing list