##// END OF EJS Templates
rust-index: support `unionrepo`'s compressed length hack...
Raphaël Gomès -
r52129:eb676c35 default
parent child Browse files
Show More
@@ -479,7 +479,18 b' impl Index {'
479 } else {
479 } else {
480 e.raw_offset()
480 e.raw_offset()
481 },
481 },
482 data_compressed_length: e.compressed_len().try_into().unwrap(),
482 data_compressed_length: e
483 .compressed_len()
484 .try_into()
485 .unwrap_or_else(|_| {
486 // Python's `unionrepo` sets the compressed length to be
487 // `-1` (or `u32::MAX` if transmuted to `u32`) because it
488 // cannot know the correct compressed length of a given
489 // revision. I'm not sure if this is true, but having this
490 // edge case won't hurt other use cases, let's handle it.
491 assert_eq!(e.compressed_len(), u32::MAX);
492 NULL_REVISION.0
493 }),
483 data_uncompressed_length: e.uncompressed_len(),
494 data_uncompressed_length: e.uncompressed_len(),
484 data_delta_base: e.base_revision_or_base_of_delta_chain().0,
495 data_delta_base: e.base_revision_or_base_of_delta_chain().0,
485 link_rev: e.link_revision().0,
496 link_rev: e.link_revision().0,
General Comments 0
You need to be logged in to leave comments. Login now