histedit: convert bool to bytestring manually
authorAugie Fackler <augie@google.com>
Tue, 13 Feb 2018 17:25:25 -0500
changeset 36167 73621823a1ac
parent 36166 ccf7ae119769
child 36168 be73fa5b42d3
histedit: convert bool to bytestring manually Yes, this format has 'True' and 'False' in it. I'm sorry, as it's almost certainly my fault. Differential Revision: https://phab.mercurial-scm.org/D2240
hgext/histedit.py
--- a/hgext/histedit.py	Tue Feb 13 13:38:38 2018 -0500
+++ b/hgext/histedit.py	Tue Feb 13 17:25:25 2018 -0500
@@ -344,7 +344,7 @@
         fp.write('v1\n')
         fp.write('%s\n' % node.hex(self.parentctxnode))
         fp.write('%s\n' % node.hex(self.topmost))
-        fp.write('%s\n' % self.keep)
+        fp.write('%s\n' % ('True' if self.keep else 'False'))
         fp.write('%d\n' % len(self.actions))
         for action in self.actions:
             fp.write('%s\n' % action.tostate())