mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-28 01:28:46 -04:00
fix bad default: manifest.archives.list(consider_checkpoints=False), fixes #5668
also, add a comment about it, to avoid future similar mistakes.
This commit is contained in:
parent
649603f247
commit
a77db94b01
1 changed files with 5 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ class Archives(abc.MutableMapping):
|
|||
name = safe_encode(name)
|
||||
del self._archives[name]
|
||||
|
||||
def list(self, *, glob=None, match_end=r'\Z', sort_by=(), consider_checkpoints=False, first=None, last=None, reverse=False):
|
||||
def list(self, *, glob=None, match_end=r'\Z', sort_by=(), consider_checkpoints=True, first=None, last=None, reverse=False):
|
||||
"""
|
||||
Return list of ArchiveInfo instances according to the parameters.
|
||||
|
||||
|
|
@ -82,6 +82,10 @@ class Archives(abc.MutableMapping):
|
|||
Apply *first* and *last* filters, and then possibly *reverse* the list.
|
||||
|
||||
*sort_by* is a list of sort keys applied in reverse order.
|
||||
|
||||
Note: for better robustness, all filtering / limiting parameters must default to
|
||||
"not limit / not filter", so a FULL archive list is produced by a simple .list().
|
||||
some callers EXPECT to iterate over all archives in a repo for correct operation.
|
||||
"""
|
||||
if isinstance(sort_by, (str, bytes)):
|
||||
raise TypeError('sort_by must be a sequence of str')
|
||||
|
|
|
|||
Loading…
Reference in a new issue