Patchwork D2459: py3: use encoding.strtolocal() to convert str to bytes

login
register
mail settings
Submitter phabricator
Date Feb. 27, 2018, 12:56 p.m.
Message ID <5a308f3e6cf9e90c5f42599424a3fa9c@localhost.localdomain>
Download mbox | patch
Permalink /patch/28448/
State Not Applicable
Headers show

Comments

phabricator - Feb. 27, 2018, 12:56 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa918c996a881: py3: use encoding.strtolocal() to convert str to bytes (authored by pulkit, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2459?vs=6130&id=6165#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2459?vs=6130&id=6165

REVISION DETAIL
  https://phab.mercurial-scm.org/D2459

AFFECTED FILES
  hgext/patchbomb.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -85,6 +85,7 @@ 
 from mercurial import (
     cmdutil,
     commands,
+    encoding,
     error,
     formatter,
     hg,
@@ -669,7 +670,8 @@ 
         start_time = util.makedate()
 
     def genmsgid(id):
-        return '<%s.%d@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
+        return '<%s.%d@%s>' % (id[:20], int(start_time[0]),
+                               encoding.strtolocal(socket.getfqdn()))
 
     # deprecated config: patchbomb.from
     sender = (opts.get('from') or ui.config('email', 'from') or