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

Augie Fackler raf at durin42.com
Tue Sep 13 23:11:19 EDT 2016


# HG changeset patch
# User Augie Fackler <augie at 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

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()


More information about the Mercurial-devel mailing list