Skip to content

Conversation

@Sushma-1706
Copy link

Description

What is this PR?

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
The existing always overwrite option was misleading because it did not
actually force overwriting files. By default, rclone only copies files when
timestamps or checksums differ, which caused confusion for users.

This PR clarifies the overwrite behavior and aligns it with rclone semantics.

What does this PR do?
This PR refines overwrite behavior for transfers by:

  1. Adding a new if_different option that uses rclone’s default behavior
  2. Updating always to use --ignore-times so it truly overwrites files
  3. Leaving never and if_source_newer unchanged
  4. Making overwrite behavior explicit and predictable

References

Closes #624

How has this PR been tested?

This change affects argument construction only.
The logic was verified by inspecting the generated rclone arguments and ensuring
they match the expected rclone flags.

No runtime behavior or external dependencies were modified.

Is this a breaking change?

No.
This change clarifies behavior but does not remove or rename any existing options.

Does this PR require an update to the documentation?

Yes — documentation updated in transfer-data.md.

Checklist

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@JoeZiminski
Copy link
Member

Hi @Sushma-1706 thanks for this! This looks good to me, I'm at a conference this week but will take a proper look next week. We will have to extend the tests a bit for this, but in the meantime I think this can be extended to the terminal-user interface.

If you type 'datashuttle launch' in a terminal (in your environment where datashuttle is installed) it will start the TUI. You can see on the docs how to set up a project, but on the 'transfer' tab we have a dropdown that allows the user to select the transfer method. This new option could be added there. Let me know if you have any questions!

@Sushma-1706
Copy link
Author

Thanks @JoeZiminski, glad to hear it looks good!
That makes sense — I agree the new overwrite option would be useful in the TUI as well.
I’m happy to take that on as a follow-up change once this PR is reviewed/merged, so we can keep this one focused.
Looking forward to your review next week — thanks!

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.

Refine the different overwrite transfer arguments

2 participants