more clear exception if borg check does not help, fixes #2427#2432
more clear exception if borg check does not help, fixes #2427#2432enkore merged 1 commit intoborgbackup:masterfrom
Conversation
src/borg/repository.py
Outdated
|
|
||
| class RepoBeyondRepair(ErrorWithTraceback): | ||
| """Heavily damaged repository {} detected - maybe this is beyond being repairable.""" | ||
|
|
There was a problem hiding this comment.
hmm, considering RPC, maybe adding a new exception is not the best way to deal with this.
i'll check if it can be done otherwise...
f42d993 to
697942c
Compare
Codecov Report
@@ Coverage Diff @@
## master #2432 +/- ##
==========================================
+ Coverage 82.95% 82.95% +<.01%
==========================================
Files 20 20
Lines 7556 7557 +1
Branches 1288 1288
==========================================
+ Hits 6268 6269 +1
+ Misses 929 928 -1
- Partials 359 360 +1
Continue to review full report at Codecov.
|
|
merge? we can do a better fix / refactor later to make the msg format more flexible. |
| if index_transaction_id is not None and segments_transaction_id is None: | ||
| raise self.CheckNeeded(self.path) | ||
| # we have a transaction id from the index, but we did not find *any* | ||
| # commit in the segment files (thus no segments transaction id). |
There was a problem hiding this comment.
IIRC check actually covers this case by just appending a commit.
There was a problem hiding this comment.
# self.index, self.segments, self.compact now reflect the state of the segment files up to <transaction_id>
# We might need to add a commit tag if no committed segment is found
if repair and segments_transaction_id is None:
report_error('Adding commit tag to segment {}'.format(transaction_id))
self.io.segment = transaction_id + 1
self.io.write_commit()There was a problem hiding this comment.
hmm, this is either not in 1.0.10 (see traceback in #2427) or done after the time when it already relies on the commit being there.
No description provided.