@@ -748,17 +748,46 @@ def relational_compare_md5s_cmd(args: argparse.Namespace) -> NoReturn:
748748 elif comparison [f ] == "new" :
749749 newfns .append (f )
750750
751+ md5sdict : Dict [str , Tuple [List [str ], List [str ]]] = {}
752+
753+ for (f , md5 ) in md5s1 .items ():
754+ md5sdict .setdefault (md5 , ([], []))
755+ md5sdict [md5 ][0 ].append (f )
756+
757+ for (f , md5 ) in md5s2 .items ():
758+ md5sdict .setdefault (md5 , ([], []))
759+ md5sdict [md5 ][1 ].append (f )
760+
751761 print ("Md5 comparison" )
752762 print ("=" * 80 )
753763 print ("Equal: " + str (eqcount ))
754764 print ("" )
755- print ("Different: " + ", " .join (neq ))
765+ print ("Different: " + str ( len ( neq )) + " \n " + ", " .join (neq ))
756766 print ("" )
757- print ("Missing: " + ", " .join (missing ))
767+ print ("Missing: " + str ( len ( missing )) + " \n " + ", " .join (missing ))
758768 print ("" )
759- print ("New functions: " + ", " .join (newfns ))
769+ print ("New functions: " + str ( len ( newfns )) + " \n " + ", " .join (newfns ))
760770 print ("" )
761771
772+ print ("\n md5 mapping" )
773+ for (md5 , t ) in sorted (md5sdict .items ()):
774+ print (md5 + " " + str (t ))
775+
776+ count = 0
777+ countall = 0
778+ print ("\n md5s that appear in both" )
779+ for (md5 , t ) in sorted (md5sdict .items ()):
780+ if len (t [0 ]) > 0 and len (t [1 ]) > 0 :
781+ count += 1
782+ if len (t [0 ]) == len (t [1 ]):
783+ countall += len (t [0 ])
784+ else :
785+ print (" *** lengths are different" )
786+ print (str (t [0 ]) + " ===> " + str (t [1 ]))
787+
788+ print ("\n Partial matches: " + str (count ))
789+ print ("All matches: " + str (countall ))
790+
762791 exit (0 )
763792
764793
0 commit comments