mq: open status file et al in bytes mode
authorAugie Fackler <augie@google.com>
Wed, 17 Jan 2018 22:05:02 -0500
changeset 41826 512113eb9d264674b593ad037496b5009a49c3d3
parent 41825 9bce28609a95fdc8c363f7e217169fada042d63a
child 41827 522f868680ca213a06e2255cb71c5c78dc1046c2
push id662
push usergszorc@mozilla.com
push dateFri, 02 Feb 2018 00:19:02 +0000
mq: open status file et al in bytes mode Differential Revision: https://phab.mercurial-scm.org/D1902
hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -690,17 +690,17 @@ class queue(object):
                     write(_('skipping %s - guarded by %s\n') %
                           (self.series[idx], why))
                 else:
                     write(_('skipping %s - no matching guards\n') %
                           self.series[idx])
 
     def savedirty(self):
         def writelist(items, path):
-            fp = self.opener(path, 'w')
+            fp = self.opener(path, 'wb')
             for i in items:
                 fp.write("%s\n" % i)
             fp.close()
         if self.applieddirty:
             writelist(map(str, self.applied), self.statuspath)
             self.applieddirty = False
         if self.seriesdirty:
             writelist(self.fullseries, self.seriespath)