git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix weird function...
[linux-2.6.git]
/
configs
/
kompare
diff --git
a/configs/kompare
b/configs/kompare
index
11df5e9
..
3d6676f
100755
(executable)
--- a/
configs/kompare
+++ b/
configs/kompare
@@
-5,7
+5,7
@@
# Marc E. Fiuczynski <mef@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Marc E. Fiuczynski <mef@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: kompare,v 1.
1 2006/11/30 16:41:09
mef Exp $
+# $Id: kompare,v 1.
5 2006/12/14 05:08:53
mef Exp $
#
import sys, re, os
#
import sys, re, os
@@
-15,7
+15,7
@@
def process(file):
CONFIGS = {}
for line in file.readlines():
iline = line.lower()
CONFIGS = {}
for line in file.readlines():
iline = line.lower()
- iline.strip()
+ iline
= iline
.strip()
if len(iline)==0: continue
firstchar = iline[0]
if len(iline)==0: continue
firstchar = iline[0]
@@
-66,22
+66,23
@@
if args[0] == "-a":
(old,oldorder)= process(open(args[0]))
(new,neworder)= process(open(args[1]))
(old,oldorder)= process(open(args[0]))
(new,neworder)= process(open(args[1]))
-newstate = {None:'REM
',"is not set":'DIS','y':'BLT','m':'MOD
'}
+newstate = {None:'REM
OVED',"is not set":'DISABLE','y':'BUILTIN','m':'MODULE
'}
keys = neworder
keys = neworder
+seen = {}
for key in keys:
o = old.get(key,None)
n = new[key]
if n==o and not showall: continue
print "%6s -> %6s : %s" % (newstate.get(o,o),newstate.get(n,n),key)
for key in keys:
o = old.get(key,None)
n = new[key]
if n==o and not showall: continue
print "%6s -> %6s : %s" % (newstate.get(o,o),newstate.get(n,n),key)
+ seen[key] = None
# not sure we care about what options have been removed
# from from.config file
# not sure we care about what options have been removed
# from from.config file
-sys.exit(0)
-oldstate = {None:'A',"is not set":'D','y':'B','m':'M'}
+oldstate = {None:'REMOVED',"is not set":'DISABLE','y':'BUILTIN','m':'MODULE '}
keys = oldorder
for key in keys:
keys = oldorder
for key in keys:
- n = new.get(key,-1)
+ if seen.has_key(key): continue
+ n = new.get(key,None)
o = old[key]
o = old[key]
- if n == -1 and not showall:
- print "%c -> %c : %s" % (oldstate[o],oldstate[n],key)
-
+ if n == o and not showall: continue
+ print "%6s -> %6s : %s" % (oldstate.get(o,o),oldstate.get(n,n),key)