Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy: replace --repo2 with --from-repo #3742

Merged
merged 1 commit into from Aug 19, 2022

Conversation

MichaelEischer
Copy link
Member

@MichaelEischer MichaelEischer commented May 7, 2022

What does this PR change? What problem does it solve?

init and copy use --repo2 with two different meaning which has proven to be confusing for users. --from-repo now consistently marks a source repository from which data is read. --repo is now always the target/destination repository.

The PR is already working, however, the parameter names still require discussion.

Was the change previously discussed in an issue or on the forum?

https://forum.restic.net/t/restic-repository2-confusion/5017

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

`init` and `copy` use `--repo2` with two different meaning which has
proven to be confusing for users. `--from-repo` now consistently marks a
source repository from which data is read. `--repo` is now always the
target/destination repository.
@MichaelEischer
Copy link
Member Author

I've rebased the PR and added a changelog entry. So let's merge this.

@MichaelEischer MichaelEischer merged commit dbca93d into restic:master Aug 19, 2022
@MichaelEischer MichaelEischer deleted the from-repo branch August 19, 2022 17:01
mtlynch added a commit to mtlynch/resticpy that referenced this pull request Jan 5, 2023
Hi there,

due to restic/restic#3742 --repo2 is deprecated.
I've added full support for --from-repo and --from-password-file. This
should be completely backward compatible and repo2 still works (but give
it a good test anyway).

Using repo2 will now print a warning like with restic:

![grafik](https://user-images.githubusercontent.com/13227454/210404198-0a7ffcec-83cb-45b9-87e4-6a7808a424bc.png)

I've added additional FIXME notes where you can remove code in your next
major (breaking) release.

Unfortunately I was not successful in adjusting the e2e tests.
Changing this:

![grafik](https://user-images.githubusercontent.com/13227454/210405035-1bec4cae-0fe8-453c-aac5-d5953d0b04d5.png)

caused this:

![grafik](https://user-images.githubusercontent.com/13227454/210405167-e5ba9001-a96f-4dcf-bec7-7a877c9061d2.png)

It looks like something is flaky (or not cleaned up afterwards for
another run). Or my dev setup is broken.

Co-authored-by: Michael Lynch <git@mtlynch.io>
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.

None yet

1 participant