s3: add HCP provider and list_versions_oldest_first quirk by chris081519-crypto · Pull Request #9313 · rclone/rclone

What is the purpose of this change?

Hitachi Content Platform (HCP) returns object versions in ascending chronological order (oldest first), unlike the S3 standard which returns them newest first. This causes --s3-version-at to return the wrong version when used with HCP.

Add a new list_versions_oldest_first quirk which reverses the Versions and DeleteMarkers lists before merging, so the existing versionAt filter works correctly regardless of backend sort order.

Add HCP as a new provider with this quirk enabled by default.

See: https://docs.hitachivantara.com/r/en-us/content-platform/9.6.x/mk-95hcph002/using-the-hitachi-api-for-amazon-s3/working-with-buckets/listing-bucket-contents-version-2

Was the change discussed in an issue or in the forum before?

No.
The quirk should be useful for all other S3 (more or less) compatible providers listing the versions/delete-markers in the "oldest first" order.

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)