Show More
@@ -3,6 +3,7 b' from __future__ import absolute_import, ' | |||
|
3 | 3 | from mercurial import ( |
|
4 | 4 | error, |
|
5 | 5 | pycompat, |
|
6 | ui as uimod, | |
|
6 | 7 | util, |
|
7 | 8 | wireproto, |
|
8 | 9 | wireprototypes, |
@@ -22,12 +23,13 b' class proto(object):' | |||
|
22 | 23 | pass |
|
23 | 24 | |
|
24 | 25 | class clientpeer(wireproto.wirepeer): |
|
25 | def __init__(self, serverrepo): | |
|
26 | def __init__(self, serverrepo, ui): | |
|
26 | 27 | self.serverrepo = serverrepo |
|
28 | self._ui = ui | |
|
27 | 29 | |
|
28 | 30 | @property |
|
29 | 31 | def ui(self): |
|
30 |
return self. |
|
|
32 | return self._ui | |
|
31 | 33 | |
|
32 | 34 | def url(self): |
|
33 | 35 | return b'test' |
@@ -84,7 +86,7 b' def greet(repo, proto, name):' | |||
|
84 | 86 | wireproto.commands[b'greet'] = (greet, b'name',) |
|
85 | 87 | |
|
86 | 88 | srv = serverrepo() |
|
87 | clt = clientpeer(srv) | |
|
89 | clt = clientpeer(srv, uimod.ui()) | |
|
88 | 90 | |
|
89 | 91 | print(clt.greet(b"Foobar")) |
|
90 | 92 | b = clt.iterbatch() |
General Comments 0
You need to be logged in to leave comments.
Login now