added more debugs into Dump(), its noisier, but while testing in small number of files in DEV, its needed

This commit is contained in:
2021-03-21 12:08:21 +11:00
parent 9c263f54e3
commit 054d024ae0

View File

@@ -253,9 +253,14 @@ class Duplicates:
print( "############ Files that are in both Import and Storage Paths ###########")
for h in self.ip_to_sp_dups_keep:
if len(self.ip_to_sp_dups_del[h])>2:
print( f"hash={h}, keep: {self.ip_to_sp_dups_keep[h]}" )
print( f"(1 file of 2+) hash={h}, keep: {self.ip_to_sp_dups_keep[h]}" )
for d in self.ip_to_sp_dups_del[h]:
print( f"Del: {d}" )
else:
print( f"(1 file of 2) hash={h}, keep: {self.ip_to_sp_dups_keep[h]}" )
for d in self.ip_to_sp_dups_del[h]:
print( f"Del: {d}" )
print( f"{len(self.ip_to_sp_dups_keep)} sets of duplicate files to delete at least 1, anything with 2 or more dups is printed above explicitly" )
if len(self.dups_to_process) > 0:
@@ -268,6 +273,7 @@ class Duplicates:
print( f"{len(self.dups_to_process)} sets of duplicate files to delete at least 1, anything with 2 or more dups is printed above explicitly" )
if len(self.preferred_file) > 0:
print( " We have preferred (regexp matched) ###########")
for h in self.preferred_file:
print( f"hash={h}, keep this one: {self.preferred_file[h]} from ", end='' )
for d in self.dups_to_process[h]:
@@ -276,6 +282,7 @@ class Duplicates:
print( f"{len(self.preferred_file)} duplicate files we will keep as they match the regexp" )
if len(self.per_path_dups) > 0:
print( "############ Duplicate Files in Paths that are needing to be futher processed ###########")
for pair in self.per_path_dups:
print( f"{pair.count} dups in dir1: {pair.did1} dir2: {pair.did2}" )
if pair.did1 in self.preferred_path: