From c3008dc261f94e9993114d4bb825cb57ade43589 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Fri, 8 Mar 2019 13:48:19 +0000 Subject: Changed output to show the file name instead of ours and theirs --- xmldiff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmldiff.py b/xmldiff.py index 3449053..fdeb8b1 100644 --- a/xmldiff.py +++ b/xmldiff.py @@ -51,10 +51,10 @@ for key, value in byHandle.items(): for sekey, sevalue in subelements.items(): ensureKey(differences, key, list) if sevalue[0] is None: - differences[key].append(sekey + ' only in ours') + differences[key].append(sekey + ' only in ' + argv[1]) match = False elif sevalue[1] is None: - differences[key].append(sekey + ' only in theirs') + differences[key].append(sekey + ' only in ' + argv[2]) match = False elif sevalue[0] != sevalue[1]: differences[key].append(sekey + ' differs') @@ -64,12 +64,12 @@ for key, value in byHandle.items(): results[2].append(key) # Print results in groups -print 'Elements only in ours (' + str(len(results[0])) + '):' +print 'Elements only in ' + argv[1] + ' (' + str(len(results[0])) + '):' for e in results[0]: print ' ' + e print -print 'Elements only in theirs (' + str(len(results[1])) + '):' +print 'Elements only in ' + argv[2] + ' (' + str(len(results[1])) + '):' for e in results[1]: print ' ' + e -- cgit v1.2.3