Comments
Patch
@@ -25,6 +25,7 @@ from . import (
exchange,
pushkey as pushkeymod,
pycompat,
+ repoview,
streamclone,
util,
wireprototypes,
@@ -57,7 +58,7 @@ def clientcompressionsupport(proto):
# wire protocol command can either return a string or one of these classes.
-def getdispatchrepo(repo, proto, command):
+def getdispatchrepo(repo, proto, command, accesshidden=False):
"""Obtain the repo used for processing wire protocol commands.
The intent of this function is to serve as a monkeypatch point for
@@ -65,10 +66,17 @@ def getdispatchrepo(repo, proto, command
specialized circumstances.
"""
viewconfig = repo.ui.config('server', 'view')
+
+ # Only works if the filter actually support being upgraded to show visible
+ # changesets
+ if (accesshidden and viewconfig is not None
+ and viewconfig + '.hidden' in repoview.filtertable):
+ viewconfig += '.hidden'
+
return repo.filtered(viewconfig)
-def dispatch(repo, proto, command):
- repo = getdispatchrepo(repo, proto, command)
+def dispatch(repo, proto, command, accesshidden=False):
+ repo = getdispatchrepo(repo, proto, command, accesshidden=accesshidden)
func, spec = commands[command]
args = proto.getargs(spec)