-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat: Check if Include folders/files do exists (in case they are removed) #1718
Open
rafaelhdr
wants to merge
25
commits into
bit-team:dev
Choose a base branch
from
rafaelhdr:check-included-do-exists
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
f6bf5bc
Check if Include folders/files do exists (in case they are removed)
rafaelhdr d4556ca
Update CHANGES
rafaelhdr 5f3a8c7
PEP8 convention
rafaelhdr e07d5a1
PEP8 convention
rafaelhdr ce4d761
PEP8 convention
rafaelhdr 27fe2da
refactor code from review
rafaelhdr 27ac817
PEP8 snake case
rafaelhdr 4f36503
fixes missing self
rafaelhdr 9cb8348
PEP8 snake convention
rafaelhdr 7472f54
PEP8 blank lines
rafaelhdr 287d129
Merge branch 'dev' into check-included-do-exists
buhtz 5161ccd
Merge branch 'dev' into check-included-do-exists
buhtz 45aa011
move warning about missing snapshots for after mounting
rafaelhdr c2941ba
display error message on include
rafaelhdr 6668487
Merge remote-tracking branch 'bit/dev' into check-included-do-exists
rafaelhdr 205ee49
Merge branch 'dev' into check-included-do-exists
buhtz 03c1050
Merge branch 'dev' into check-included-do-exists
buhtz bb5969c
document and rename has_missing_includes
rafaelhdr 5416356
Merge remote-tracking branch 'bit/dev' into check-included-do-exists
rafaelhdr 42b5e06
Merge branch 'dev' into check-included-do-exists
buhtz 1f9d888
Merge branch 'dev' into check-included-do-exists
buhtz 3ac5526
Update common/snapshots.py
rafaelhdr 8004348
Update qt/app.py
rafaelhdr 31b7424
review fixes
7dd5b74
Merge remote-tracking branch 'bit-team/dev' into check-included-do-ex…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1286,12 +1286,27 @@ def updateTimeLine(self, refreshSnapshotsList=True): | |||||||||
item = self.timeLine.addSnapshot(sid) | ||||||||||
self.timeLine.checkSelection() | ||||||||||
|
||||||||||
def validate_on_take_snapshot(self): | ||||||||||
buhtz marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
missing = snapshots.has_missing_includes(self.config.include()) | ||||||||||
if missing: | ||||||||||
msg_missing = '\n'.join(missing) | ||||||||||
msg = _('The following directories are missing: {dirs} Do you want to proceed?'.format( | ||||||||||
dirs=f'\n{msg_missing}\n\n')) | ||||||||||
Comment on lines
+1293
to
+1294
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Don't worry, this translation stuff is complex.
Suggested change
|
||||||||||
answer = messagebox.warningYesNo(self, msg) | ||||||||||
buhtz marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
return answer == QMessageBox.StandardButton.Yes | ||||||||||
return True | ||||||||||
|
||||||||||
def btnTakeSnapshotClicked(self): | ||||||||||
backintime.takeSnapshotAsync(self.config) | ||||||||||
self.updateTakeSnapshot(True) | ||||||||||
self._take_snapshot_clicked(checksum=False) | ||||||||||
|
||||||||||
def btnTakeSnapshotChecksumClicked(self): | ||||||||||
backintime.takeSnapshotAsync(self.config, checksum = True) | ||||||||||
self._take_snapshot_clicked(checksum=True) | ||||||||||
|
||||||||||
def _take_snapshot_clicked(self, checksum): | ||||||||||
if not self.validate_on_take_snapshot(): | ||||||||||
return | ||||||||||
|
||||||||||
backintime.takeSnapshotAsync(self.config, checksum=checksum) | ||||||||||
self.updateTakeSnapshot(True) | ||||||||||
|
||||||||||
def btnStopTakeSnapshotClicked(self): | ||||||||||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move this entry up to the first section in the changelog.