Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 from __future__ import print_function
00023 import argparse
00024 import os
00025 from xmldiff.xmldiff import compareFiles
00026
00027 if __name__ == '__main__':
00028 parser = argparse.ArgumentParser(description='Compares all the .xacro in two folders.')
00029 parser.add_argument('folder1')
00030 parser.add_argument('folder2')
00031 args = parser.parse_args()
00032 files1 = set([ i for i in os.listdir(args.folder1) if i.endswith('.xacro')])
00033 files2 = set([ i for i in os.listdir(args.folder2) if i.endswith('.xacro')])
00034 for i in files1.intersection(files2):
00035 diff = compareFiles(os.path.join(args.folder1, i), os.path.join(args.folder2, i))
00036 if diff:
00037 print('---------------------------------------------------------')
00038 print('File %s in common' % i)
00039 print('---------------------------------------------------------')
00040 print(diff)