Browse Source

better debugging output for merging.

pull/5/head
Herbert Poul 3 years ago
parent
commit
011c40d31b
  1. 13
      lib/src/kdbx_format.dart

13
lib/src/kdbx_format.dart

@ -467,6 +467,10 @@ class MergeContext implements OverwriteContext {
final List<MergeChange> changes = [];
final List<MergeWarning> warnings = [];
int totalChanges() {
return deletedObjects.length + changes.length;
}
void markAsMerged(KdbxObject object) {
if (merged.containsKey(object.uuid)) {
throw StateError(
@ -499,6 +503,15 @@ class MergeContext implements OverwriteContext {
].join('\n '))
.join('\n');
}
String debugSummary() {
return 'Changes: ${changes.length}, Deleted: ${deletedObjects.length}, Warnings: ${warnings.join(', ')}';
}
@override
String toString() {
return '$runtimeType{${debugSummary()}';
}
}
class _KeysV4 {

Loading…
Cancel
Save