Patchwork [3,of,8,v2] rebase: cope with the notion that flag defaults might be None

login
register
mail settings
Submitter Augie Fackler
Date Aug. 30, 2016, 8:16 p.m.
Message ID <69d84366fa224f5dedfd.1472588176@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/16489/
State Changes Requested
Headers show

Comments

Augie Fackler - Aug. 30, 2016, 8:16 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1472585699 14400
#      Tue Aug 30 15:34:59 2016 -0400
# Node ID 69d84366fa224f5dedfdd18a9f5e2413060a8121
# Parent  e88fe4eb4e8cc3c956ed50b35744a585d51a0e18
rebase: cope with the notion that flag defaults might be None

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1072,9 +1072,9 @@  def storestatus(repo, originalwd, target
     f.write(repo[originalwd].hex() + '\n')
     f.write(repo[target].hex() + '\n')
     f.write(repo[external].hex() + '\n')
-    f.write('%d\n' % int(collapse))
-    f.write('%d\n' % int(keep))
-    f.write('%d\n' % int(keepbranches))
+    f.write('%d\n' % int(bool(collapse)))
+    f.write('%d\n' % int(bool(keep)))
+    f.write('%d\n' % int(bool(keepbranches)))
     f.write('%s\n' % (activebookmark or ''))
     for d, v in state.iteritems():
         oldrev = repo[d].hex()