# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1520206486 18000
#      Sun Mar 04 18:34:46 2018 -0500
# Node ID db161596cd95de9da2ac0fc4b2496ac295f63672
# Parent  faea088aebdbda2e32e5339cbb6df51283fe2f56
py3: fix type of default username

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -48,6 +48,7 @@ test-command-template.t
 test-commit-amend.t
 test-commit-unresolved.t
 test-commit.t
+test-committer.t
 test-completion.t
 test-config-env.py
 test-config.t
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -800,7 +800,8 @@ class ui(object):
             user = self.prompt(_("enter a commit username:"), default=None)
         if user is None and not self.interactive():
             try:
-                user = '%s@%s' % (util.getuser(), socket.getfqdn())
+                user = '%s@%s' % (util.getuser(),
+                                  encoding.strtolocal(socket.getfqdn()))
                 self.warn(_("no username found, using '%s' instead\n") % user)
             except KeyError:
                 pass
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to