##// END OF EJS Templates
check-config: mention the file and line of the error...
Ryan McElroy -
r33571:e470f12d default
parent child Browse files
Show More
@@ -48,7 +48,9 b' def main(args):'
48 prevname = ''
48 prevname = ''
49 confsect = ''
49 confsect = ''
50 carryover = ''
50 carryover = ''
51 linenum = 0
51 for l in open(f):
52 for l in open(f):
53 linenum += 1
52
54
53 # check topic-like bits
55 # check topic-like bits
54 m = re.match('\s*``(\S+)``', l)
56 m = re.match('\s*``(\S+)``', l)
@@ -110,9 +112,10 b' def main(args):'
110 default = '<variable>'
112 default = '<variable>'
111 if (name in foundopts and (ctype, default) != foundopts[name]
113 if (name in foundopts and (ctype, default) != foundopts[name]
112 and name not in allowinconsistent):
114 and name not in allowinconsistent):
113 print(l)
115 print(l.rstrip())
114 print("conflict on %s: %r != %r" % (name, (ctype, default),
116 print("conflict on %s: %r != %r" % (name, (ctype, default),
115 foundopts[name]))
117 foundopts[name]))
118 print("at %s:%d:" % (f, linenum))
116 foundopts[name] = (ctype, default)
119 foundopts[name] = (ctype, default)
117 carryover = ''
120 carryover = ''
118 else:
121 else:
@@ -32,8 +32,8 b' Sanity check check-config.py'
32
32
33 $ $PYTHON contrib/check-config.py < $TESTTMP/files
33 $ $PYTHON contrib/check-config.py < $TESTTMP/files
34 foo = ui.configint('ui', 'intdefault', default=42)
34 foo = ui.configint('ui', 'intdefault', default=42)
35
36 conflict on ui.intdefault: ('int', '42') != ('int', '1')
35 conflict on ui.intdefault: ('int', '42') != ('int', '1')
36 at $TESTTMP/testfile.py:12: (glob)
37 undocumented: ui.doesnotexist (str)
37 undocumented: ui.doesnotexist (str)
38 undocumented: ui.intdefault (int) [42]
38 undocumented: ui.intdefault (int) [42]
39 undocumented: ui.intdefault2 (int) [42]
39 undocumented: ui.intdefault2 (int) [42]
General Comments 0
You need to be logged in to leave comments. Login now