sapling/cstore
Jun Wu 4a613bcaef datapack: update the format about metadata
Summary:
This diff makes 2 changes to v1 packfile metadata:

1. Move `key` in a metadata entry to before `size`.

```
old: [entry-size: 2 byte] [key: 1 byte] [data: var length]
new: [key: 1 byte] [data-size: 2 byte] [data: var length]
```

Previously `entry-size == 0` does not make sense.

2. Use binary to represent sizes, instead of ASCII.

Related utility methods are cleaned up a bit so it's harder to make mistakes.

Test Plan: Updated existing tests

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4983189

Signature: t1:4983189:1493689852:22d544d73ed63fac83f849786de035af304161ce
2017-05-01 19:03:25 -07:00
..
bitmanipulation.h cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
compat.h cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
datapackstore.cpp portability: use COMPOUND_LITERAL macro in place of actual compound literals 2017-04-06 09:34:40 -07:00
datapackstore.h c-extensions: fixup some compiler/environment portability concerns 2017-04-12 16:34:53 -07:00
key.h c-extensions: fixup some compiler/environment portability concerns 2017-04-12 16:34:53 -07:00
match.h treemanifest: support matcher in diff 2017-03-12 12:49:18 -07:00
mpatch.c cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
mpatch.h cstore: add mpatch code from core 2017-02-23 14:03:03 -08:00
py-cdatapack.h datapack: update the format about metadata 2017-05-01 19:03:25 -07:00
py-cstore.cpp cstore: implement UnionDatapackStore 2017-02-23 14:03:03 -08:00
py-datapackstore.h cstore: move pythonutil to cstore 2017-03-07 11:39:46 -08:00
py-structs.h cstore: move uniondatapackstore holder to be a shared_ptr 2017-02-23 14:03:04 -08:00
py-treemanifest.h treemanifest: ConstantStringRef -> shared_ptr<string> 2017-04-25 15:44:55 -07:00
pythonutil.cpp treemanifest: ConstantStringRef -> shared_ptr<string> 2017-04-25 15:44:55 -07:00
pythonutil.h cstore: move pythonutil to cstore 2017-03-07 11:39:46 -08:00
store.h cstore: centos6 doesn't know about nullptr 2017-04-26 11:09:59 -07:00
uniondatapackstore.cpp treemanifest: ConstantStringRef -> shared_ptr<string> 2017-04-25 15:44:55 -07:00
uniondatapackstore.h cstore: implement markForRefresh on cdatapackstore 2017-03-01 16:55:18 -08:00