diff options
| author | Dan Engelbrecht <[email protected]> | 2022-11-18 11:35:13 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-18 02:35:13 -0800 |
| commit | 55225621f018904abf7e212320bb784dc64f8ac3 (patch) | |
| tree | 3fb962e9e0553448f9d42612bb078ff072308e1c /zenserver/upstream | |
| parent | move BasicFile to zenutil to remove zenstore dependency from zen command (#190) (diff) | |
| download | zen-55225621f018904abf7e212320bb784dc64f8ac3.tar.xz zen-55225621f018904abf7e212320bb784dc64f8ac3.zip | |
Add `import-project` and `export-project` (#183)
* Add `import-project` and `export-project` command line parsing
Diffstat (limited to 'zenserver/upstream')
| -rw-r--r-- | zenserver/upstream/hordecompute.cpp | 2 | ||||
| -rw-r--r-- | zenserver/upstream/upstreamcache.cpp | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/zenserver/upstream/hordecompute.cpp b/zenserver/upstream/hordecompute.cpp index 22b06d9c4..988386726 100644 --- a/zenserver/upstream/hordecompute.cpp +++ b/zenserver/upstream/hordecompute.cpp @@ -999,7 +999,7 @@ namespace detail { ApplyResult.TotalAttachmentBytes += AttachmentBuffer.GetCompressedSize(); ApplyResult.TotalRawAttachmentBytes += AttachmentBuffer.GetRawSize(); - CbAttachment Attachment(AttachmentBuffer); + CbAttachment Attachment(AttachmentBuffer, DecompressedId); OutputPackage.AddAttachment(Attachment); }); diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp index f9673bcd6..bc06653b9 100644 --- a/zenserver/upstream/upstreamcache.cpp +++ b/zenserver/upstream/upstreamcache.cpp @@ -253,7 +253,7 @@ namespace detail { if (CompressedBuffer Chunk = CompressedBuffer::FromCompressed(SharedBuffer(AttachmentResult.Response))) { - Package.AddAttachment(CbAttachment(Chunk)); + Package.AddAttachment(CbAttachment(Chunk, AttachmentHash.AsHash())); } else { @@ -337,7 +337,7 @@ namespace detail { { if (CompressedBuffer Chunk = CompressedBuffer::FromCompressed(SharedBuffer(BlobResult.Response))) { - Package.AddAttachment(CbAttachment(Chunk)); + Package.AddAttachment(CbAttachment(Chunk, AttachmentHash.AsHash())); } } }); @@ -1254,7 +1254,7 @@ namespace detail { { if (CompressedBuffer AttachmentBuffer = CompressedBuffer::FromCompressed(SharedBuffer(Value))) { - Package.AddAttachment(CbAttachment(AttachmentBuffer)); + Package.AddAttachment(CbAttachment(AttachmentBuffer, IoHash::FromBLAKE3(AttachmentBuffer.GetRawHash()))); } else { @@ -1312,8 +1312,9 @@ namespace detail { } BatchWriter.EndObject(); // Policy unspecified and expected to be Default - BatchWriter.AddBinaryAttachment("RawHash"sv, IoHash::FromBLAKE3(Compressed.GetRawHash())); - BatchPackage.AddAttachment(CbAttachment(Compressed)); + IoHash Hash = IoHash::FromBLAKE3(Compressed.GetRawHash()); + BatchWriter.AddBinaryAttachment("RawHash"sv, Hash); + BatchPackage.AddAttachment(CbAttachment(Compressed, Hash)); } BatchWriter.EndObject(); } |