test: test for options duplicate with global options

issue2995 should not happen anymore
This commit is contained in:
Simon Heimberg 2011-09-14 17:06:33 +02:00
parent 1071a1b580
commit 1a9ba4e000

View File

@ -19,9 +19,15 @@ hgrc.close()
u = ui.ui()
extensions.loadall(u)
globalshort = set()
globallong = set()
for option in commands.globalopts:
option[0] and globalshort.add(option[0])
option[1] and globallong.add(option[1])
for cmd, entry in commands.table.iteritems():
seenshort = set()
seenlong = set()
seenshort = globalshort.copy()
seenlong = globallong.copy()
for option in entry[1]:
if (option[0] and option[0] in seenshort) or \
(option[1] and option[1] in seenlong):