diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -42,6 +42,7 @@ ) unrecoverablewrite = registrar.command.unrecoverablewrite +readonly = registrar.command.readonly class request(object): def __init__(self, args, ui=None, repo=None, fin=None, fout=None, @@ -890,6 +891,11 @@ ui = repo.ui if options['hidden']: repo = repo.unfiltered() + # Accesing hidden commits based on func.cmdtype + if lui.configbool('experimental', 'directaccess', False): + cmdtype = func.cmdtype + if cmdtype == readonly: + repo = repo.unfiltered() args.insert(0, repo) elif rpath: ui.warn(_("warning: --repository ignored\n"))