Skip to content

Migrate in lib#2

Open
Keats wants to merge 3 commits intomainfrom
migrate
Open

Migrate in lib#2
Keats wants to merge 3 commits intomainfrom
migrate

Conversation

@Keats
Copy link
Collaborator

@Keats Keats commented Jan 29, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds migration functionality to convert DVS v1 repositories to v2 format. The migration involves converting the config file from YAML to TOML, relocating metadata files from being scattered alongside source files to a centralized .dvs directory, and computing MD5 hashes for all stored files (in addition to the existing Blake3 hashes).

Changes:

  • Added a new migrate module with migration logic and comprehensive tests
  • Refactored hash computation to use streaming approach instead of loading entire files into memory
  • Renamed DEFAULT_FOLDER_NAME to DEFAULT_METADATA_FOLDER_NAME for clarity

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
dvs/src/migrate.rs New module implementing v1 to v2 migration with atomic write/delete operations and hash verification
dvs/src/paths.rs Renamed constant to better reflect its purpose as metadata folder name
dvs/src/hashes.rs Refactored hash computation to use streaming from_reader method for better memory efficiency
dvs/src/file.rs Updated to use new streaming hash computation API
dvs/src/config.rs Made backend field public and updated to use renamed constant
dvs/src/lib.rs Exposed the new migrate module
dvs/Cargo.toml Added serde_yaml dependency for parsing v1 config files
Cargo.toml Added serde_yaml to workspace dependencies
Cargo.lock Updated with serde_yaml and its transitive dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant