diff mercurial/unionrepo.py @ 45834:b6f4a1df91bd

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
author Joerg Sonnenberger <joerg@bec.de>
date Wed, 07 Oct 2020 03:00:26 +0200
parents a5206e71c536
children 711ba0f1057e
line wrap: on
line diff
--- 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,