From 054d024ae086e08f2dcc838c130a6a027fc7cdde Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 21 Mar 2021 12:08:21 +1100 Subject: [PATCH] added more debugs into Dump(), its noisier, but while testing in small number of files in DEV, its needed --- dups.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dups.py b/dups.py index 30682e5..f47b464 100644 --- a/dups.py +++ b/dups.py @@ -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: