diffconfig (7a9787e1eba95a166265e6a260cf30af04ef0a99) | diffconfig (6bf2e84b8cebc4c53bf44343ed4e9b88aa73e34d) |
---|---|
1#!/usr/bin/python 2# 3# diffconfig - a tool to compare .config files. 4# 5# originally written in 2006 by Matt Mackall 6# (at least, this was in his bloatwatch source code) 7# last worked on 2008 by Tim Bird 8# --- 80 unchanged lines hidden (view full) --- 89 build_dir = os.environ["KBUILD_OUTPUT"]+"/" 90 91 configa_filename = build_dir + ".config.old" 92 configb_filename = build_dir + ".config" 93 else: 94 configa_filename = sys.argv[1] 95 configb_filename = sys.argv[2] 96 | 1#!/usr/bin/python 2# 3# diffconfig - a tool to compare .config files. 4# 5# originally written in 2006 by Matt Mackall 6# (at least, this was in his bloatwatch source code) 7# last worked on 2008 by Tim Bird 8# --- 80 unchanged lines hidden (view full) --- 89 build_dir = os.environ["KBUILD_OUTPUT"]+"/" 90 91 configa_filename = build_dir + ".config.old" 92 configb_filename = build_dir + ".config" 93 else: 94 configa_filename = sys.argv[1] 95 configb_filename = sys.argv[2] 96 |
97 a = readconfig(file(configa_filename)) 98 b = readconfig(file(configb_filename)) | 97 try: 98 a = readconfig(file(configa_filename)) 99 b = readconfig(file(configb_filename)) 100 except (IOError): 101 e = sys.exc_info()[1] 102 print("I/O error[%s]: %s\n" % (e.args[0],e.args[1])) 103 usage() |
99 100 # print items in a but not b (accumulate, sort and print) 101 old = [] 102 for config in a: 103 if config not in b: 104 old.append(config) 105 old.sort() 106 for config in old: --- 23 unchanged lines hidden --- | 104 105 # print items in a but not b (accumulate, sort and print) 106 old = [] 107 for config in a: 108 if config not in b: 109 old.append(config) 110 old.sort() 111 for config in old: --- 23 unchanged lines hidden --- |