mirror of https://github.com/borgbackup/borg.git
emit a deprecation warning for --compression N
deprecating it in the source is not enough, we also need to tell the users to fix their scripts.
This commit is contained in:
parent
6d0570a6f7
commit
e6231896cd
|
@ -405,6 +405,10 @@ def CompressionSpec(s):
|
|||
raise ValueError
|
||||
# DEPRECATED: it is just --compression N
|
||||
if 0 <= compression <= 9:
|
||||
print('Warning: --compression %d is deprecated, please use --compression zlib,%d.' % (compression, compression))
|
||||
if compression == 0:
|
||||
print('Hint: instead of --compression zlib,0 you could also use --compression none for better performance.')
|
||||
print('Hint: archives generated using --compression none are not compatible with borg < 0.25.0.')
|
||||
return dict(name='zlib', level=compression)
|
||||
raise ValueError
|
||||
except ValueError:
|
||||
|
|
Loading…
Reference in New Issue