Show More
@@ -536,8 +536,17 b' class ooberror(object):' | |||||
536 | def __init__(self, message): |
|
536 | def __init__(self, message): | |
537 | self.message = message |
|
537 | self.message = message | |
538 |
|
538 | |||
|
539 | def getdispatchrepo(repo, proto, command): | |||
|
540 | """Obtain the repo used for processing wire protocol commands. | |||
|
541 | ||||
|
542 | The intent of this function is to serve as a monkeypatch point for | |||
|
543 | extensions that need commands to operate on different repo views under | |||
|
544 | specialized circumstances. | |||
|
545 | """ | |||
|
546 | return repo.filtered('served') | |||
|
547 | ||||
539 | def dispatch(repo, proto, command): |
|
548 | def dispatch(repo, proto, command): | |
540 | repo = repo.filtered("served") |
|
549 | repo = getdispatchrepo(repo, proto, command) | |
541 | func, spec = commands[command] |
|
550 | func, spec = commands[command] | |
542 | args = proto.getargs(spec) |
|
551 | args = proto.getargs(spec) | |
543 | return func(repo, proto, *args) |
|
552 | return func(repo, proto, *args) |
General Comments 0
You need to be logged in to leave comments.
Login now