mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
test: test for options duplicate with global options
issue2995 should not happen anymore
This commit is contained in:
parent
1071a1b580
commit
1a9ba4e000
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user