Offer to init repo when adding existing repo fails (#1799)#2417
Open
SaurabhCodesAI wants to merge 1 commit intoborgbase:masterfrom
Open
Offer to init repo when adding existing repo fails (#1799)#2417SaurabhCodesAI wants to merge 1 commit intoborgbase:masterfrom
SaurabhCodesAI wants to merge 1 commit intoborgbase:masterfrom
Conversation
Author
|
@m3nu can u review? |
Contributor
|
If we add this, why not remove the distinction between new/existing repo? |
Author
@m3nu |
08f0b5c to
32cfb5b
Compare
Probes with borg info first, connects or offers to init accordingly. Closes borgbase#1799
32cfb5b to
1f63ede
Compare
Author
|
@m3nu please review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When
ExistingRepoWindowgets a "does not exist" or "is not a valid repository" error from borg, prompt the user to initialize a new repo at that location. If accepted, openAddRepoWindowpre filled with the URL and name from the original dialog. If declined, fall through to the normal error message.Changes:
ExistingRepoWindow: addedinit_requestedsignal andrun_result()override that detects repo not found errors and shows a confirmation dialogRepoTab: connectedinit_requested, added_open_init_from_existing()which opensAddRepoWindowpre filled and sets local/remote mode correctlyNote: #1816 addresses the same issue but has been inactive since mid 2024. This is an independent implementation using a signal-based approach with test coverage.
Related Issue
Closes #1799
Motivation and Context
Users who try to add a non existent or uninitialized path via "Existing Repository" get a generic "Unable to add your repository" error with no guidance. This change detects that specific failure and offers to open the init dialog instead, reducing confusion between the two repo-adding workflows.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.