D3125: py3: convert user value to bytes using pycompat.fsencode()
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Apr 5 12:31:11 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
procutil.getuser() can return unicode values. Let's convert them to bytes.
This makes test-journal* pass on Python 3.5.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3125
AFFECTED FILES
hgext/journal.py
CHANGE DETAILS
diff --git a/hgext/journal.py b/hgext/journal.py
--- a/hgext/journal.py
+++ b/hgext/journal.py
@@ -256,7 +256,7 @@
_lockref = None
def __init__(self, repo):
- self.user = procutil.getuser()
+ self.user = pycompat.fsencode(procutil.getuser())
self.ui = repo.ui
self.vfs = repo.vfs
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list