##// END OF EJS Templates
tests: ignore inotify extension in test-duplicateoptions.py...
Mads Kiilerich -
r14762:6beb2674 stable
parent child Browse files
Show More
@@ -1,30 +1,30
1 import os
1 import os
2 from mercurial import ui, commands, extensions
2 from mercurial import ui, commands, extensions
3
3
4 ignore = set(['highlight', 'win32text'])
4 ignore = set(['highlight', 'inotify', 'win32text'])
5
5
6 if os.name != 'nt':
6 if os.name != 'nt':
7 ignore.add('win32mbcs')
7 ignore.add('win32mbcs')
8
8
9 disabled = [ext for ext in extensions.disabled().keys() if ext not in ignore]
9 disabled = [ext for ext in extensions.disabled().keys() if ext not in ignore]
10
10
11 hgrc = open(os.environ["HGRCPATH"], 'w')
11 hgrc = open(os.environ["HGRCPATH"], 'w')
12 hgrc.write('[extensions]\n')
12 hgrc.write('[extensions]\n')
13
13
14 for ext in disabled:
14 for ext in disabled:
15 hgrc.write(ext + '=\n')
15 hgrc.write(ext + '=\n')
16
16
17 hgrc.close()
17 hgrc.close()
18
18
19 u = ui.ui()
19 u = ui.ui()
20 extensions.loadall(u)
20 extensions.loadall(u)
21
21
22 for cmd, entry in commands.table.iteritems():
22 for cmd, entry in commands.table.iteritems():
23 seenshort = set()
23 seenshort = set()
24 seenlong = set()
24 seenlong = set()
25 for option in entry[1]:
25 for option in entry[1]:
26 if (option[0] and option[0] in seenshort) or \
26 if (option[0] and option[0] in seenshort) or \
27 (option[1] and option[1] in seenlong):
27 (option[1] and option[1] in seenlong):
28 print "command '" + cmd + "' has duplicate option " + str(option)
28 print "command '" + cmd + "' has duplicate option " + str(option)
29 seenshort.add(option[0])
29 seenshort.add(option[0])
30 seenlong.add(option[1])
30 seenlong.add(option[1])
General Comments 0
You need to be logged in to leave comments. Login now