unionrepo: don't insert index tuples with None as int field
authorJoerg Sonnenberger <joerg@bec.de>
Wed, 07 Oct 2020 03:00:26 +0200
changeset 45834 b6f4a1df91bd
parent 45833 88d5abec8f61
child 45835 4b79e92a5ef8
unionrepo: don't insert index tuples with None as int field None is not a valid size. Use -1 as placeholder instead. This will be necessary when the index starts enforcing type correctness. Differential Revision: https://phab.mercurial-scm.org/D9161
mercurial/unionrepo.py
--- a/mercurial/unionrepo.py	Wed Oct 07 03:00:01 2020 +0200
+++ b/mercurial/unionrepo.py	Wed Oct 07 03:00:26 2020 +0200
@@ -71,11 +71,11 @@
             p1node = self.revlog2.node(p1rev)
             p2node = self.revlog2.node(p2rev)
 
-            # TODO: it's probably wrong to set compressed length to None, but
+            # TODO: it's probably wrong to set compressed length to -1, but
             # I have no idea if csize is valid in the base revlog context.
             e = (
                 flags,
-                None,
+                -1,
                 rsize,
                 base,
                 link,