diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -485,7 +485,7 @@ return aliasargs(self.fn, args) def __getattr__(self, name): - adefaults = {r'norepo': True, + adefaults = {r'norepo': True, r'hiddenlevel': 0, r'optionalrepo': False, r'inferrepo': False} if name not in adefaults: raise AttributeError(name) diff --git a/mercurial/registrar.py b/mercurial/registrar.py --- a/mercurial/registrar.py +++ b/mercurial/registrar.py @@ -148,6 +148,9 @@ func.norepo = norepo func.optionalrepo = optionalrepo func.inferrepo = inferrepo + if hiddenlevel not in set([0, 1, 2]): + hiddenlevel = 0 + func.hiddenlevel = hiddenlevel if synopsis: self._table[name] = func, list(options), synopsis else: