Patchwork [3,of,7,v3,flags] rebase: cope with the notion that flag defaults might be None

login
register
mail settings
Submitter Augie Fackler
Date Sept. 14, 2016, 3:11 a.m.
Message ID <b9c309d911c7088a48a8.1473822679@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/16615/
State Changes Requested
Headers show

Comments

Augie Fackler - Sept. 14, 2016, 3:11 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1472585699 14400
#      Tue Aug 30 15:34:59 2016 -0400
# Node ID b9c309d911c7088a48a8ed25235f5365c649017b
# Parent  828f260114a3a55e246cb5de434e75bdc782e4ad
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()