Patchwork D192: phabricator: convert unicode to binary when writing patches

login
register
mail settings
Submitter phabricator
Date July 27, 2017, 7:59 p.m.
Message ID <3de843e384654e679ba2119dc1864d77@localhost.localdomain>
Download mbox | patch
Permalink /patch/22570/
State Not Applicable
Headers show

Comments

phabricator - July 27, 2017, 7:59 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG850d2ec2cf6a: phabricator: convert unicode to binary when writing patches (authored by quark).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D192?vs=429&id=432

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

AFFECTED FILES
  contrib/phabricator.py

CHANGE DETAILS




To: quark, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -560,7 +560,8 @@ 
             if k in meta:
                 header += '# %s %s\n' % (_metanamemap[k], meta[k])
 
-        write(('%s%s\n%s') % (header, desc, body))
+        content = '%s%s\n%s' % (header, desc, body)
+        write(encoding.unitolocal(content))
 
 @command('phabread',
          [('', 'stack', False, _('read dependencies'))],