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

Augie Fackler raf at durin42.com
Tue Aug 30 16:16:16 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 69d84366fa224f5dedfdd18a9f5e2413060a8121
# Parent  e88fe4eb4e8cc3c956ed50b35744a585d51a0e18
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