Patchwork D2240: histedit: convert bool to bytestring manually

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 11:14 p.m.
Message ID <differential-rev-PHID-DREV-3wpuznetjajsdiy7stxa-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27856/
State Superseded
Headers show

Comments

phabricator - Feb. 13, 2018, 11:14 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Yes, this format has 'True' and 'False' in it. I'm sorry, as it's
  almost certainly my fault.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 14, 2018, 4:55 a.m.
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  Pretty sure I wrote this patch the other day...

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
phabricator - Feb. 14, 2018, 4:56 a.m.
durin42 added a comment.


  Yeah, but it failed tests. I suspect the difference between https://phab.mercurial-scm.org/D2169 and this is the extra parens in my version?

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -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())