Patchwork D1903: mq: use pycompat.bytestr() instead of str() to encode statusentries for writing

login
register
mail settings
Submitter phabricator
Date Jan. 18, 2018, 1:39 p.m.
Message ID <differential-rev-PHID-DREV-rqm52vie3j5mhxoama3d-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26891/
State Superseded
Headers show

Comments

phabricator - Jan. 18, 2018, 1:39 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Jan. 18, 2018, 2:04 p.m.
yuja added a comment.


  Perhaps it could be just `bytes`.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -700,7 +700,7 @@ 
                 fp.write("%s\n" % i)
             fp.close()
         if self.applieddirty:
-            writelist(map(str, self.applied), self.statuspath)
+            writelist(map(pycompat.bytestr, self.applied), self.statuspath)
             self.applieddirty = False
         if self.seriesdirty:
             writelist(self.fullseries, self.seriespath)