Issue 2628 Finalise representation of patch names in prims of V3 patches

Title Finalise representation of patch names in prims of V3 patches
Priority wishlist Status needs-diagnosis/design
Milestone 2.14.3 STABLE Resolved in
Superseder Nosy List bf, ganesh
Assigned To

Created on 2019-07-11.10:06:10 by ganesh, last changed 2019-07-11.10:06:10 by ganesh.

msg20903 (view) Author: ganesh Date: 2019-07-11.10:06:08
As discussed in patch1823, we should revisit the in-memory and on-disk
representations of V3 patches before we are finally committed to them
(particularly the on-disk format). The issue is the patch names
in the primitive patches contained within a full patch.

Firstly, we could remove patch names/hashes from the on-disk format of
prims in the common case where they are the same as the containing
patch (i.e. not coming from a conflict with another patch). This
seems uncontroversial except that isn't trivial implementation-wise.

Secondly, we could replace SHA1s with the full patch names. To get
good memory usage this would require hash-consing on read, and
to get fast equality it would require reallyUnsafePtrEquality.
Personally I think that (at least on-disk) it would make our
representation more transparent and avoid tying us to a particular
hash type. But it's not clearly better.
Date User Action Args
2019-07-11 10:06:10ganeshcreate