|
@@ -1127,9 +1127,16 @@ class Archiver:
|
|
|
|
|
|
cp1 = archive1.metadata.get('chunker_params')
|
|
|
cp2 = archive2.metadata.get('chunker_params')
|
|
|
- can_compare_chunk_ids = (args.same_chunker_params or
|
|
|
- cp1 is not None and cp2 is not None and normalize_chunker_params(cp1) == normalize_chunker_params(cp2))
|
|
|
- if not can_compare_chunk_ids:
|
|
|
+ if args.same_chunker_params:
|
|
|
+ can_compare_chunk_ids = True # enforce it
|
|
|
+ elif cp1 is not None and cp2 is not None:
|
|
|
+ # we know chunker params of both archives
|
|
|
+ can_compare_chunk_ids = normalize_chunker_params(cp1) == normalize_chunker_params(cp2)
|
|
|
+ if not can_compare_chunk_ids:
|
|
|
+ self.print_warning('--chunker-params are different between archives, diff will be slow.')
|
|
|
+ else:
|
|
|
+ # we do not know chunker params of at least one of the archives
|
|
|
+ can_compare_chunk_ids = False
|
|
|
self.print_warning('--chunker-params might be different between archives, diff will be slow.\n'
|
|
|
'If you know for certain that they are the same, pass --same-chunker-params '
|
|
|
'to override this check.')
|