diff --git a/tests/test-duplicateoptions.py b/tests/test-duplicateoptions.py --- a/tests/test-duplicateoptions.py +++ b/tests/test-duplicateoptions.py @@ -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):