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