Show More
@@ -135,7 +135,7 b' class _multifile(object):' | |||
|
135 | 135 | |
|
136 | 136 | class httppeer(wireproto.wirepeer): |
|
137 | 137 | def __init__(self, ui, path, url, opener): |
|
138 |
self. |
|
|
138 | self.ui = ui | |
|
139 | 139 | self._path = path |
|
140 | 140 | self._url = url |
|
141 | 141 | self._caps = None |
@@ -150,9 +150,9 b' class httppeer(wireproto.wirepeer):' | |||
|
150 | 150 | getattr(h, "close_all", lambda: None)() |
|
151 | 151 | |
|
152 | 152 | def _openurl(self, req): |
|
153 |
if (self. |
|
|
154 |
and self. |
|
|
155 |
dbg = self. |
|
|
153 | if (self.ui.debugflag | |
|
154 | and self.ui.configbool('devel', 'debug.peer-request')): | |
|
155 | dbg = self.ui.debug | |
|
156 | 156 | line = 'devel-peer-request: %s\n' |
|
157 | 157 | dbg(line % '%s %s' % (req.get_method(), req.get_full_url())) |
|
158 | 158 | hgargssize = None |
@@ -179,17 +179,13 b' class httppeer(wireproto.wirepeer):' | |||
|
179 | 179 | start = util.timer() |
|
180 | 180 | |
|
181 | 181 | ret = self._urlopener.open(req) |
|
182 |
if self. |
|
|
182 | if self.ui.configbool('devel', 'debug.peer-request'): | |
|
183 | 183 | dbg(line % ' finished in %.4f seconds (%s)' |
|
184 | 184 | % (util.timer() - start, ret.code)) |
|
185 | 185 | return ret |
|
186 | 186 | |
|
187 | 187 | # Begin of ipeerconnection interface. |
|
188 | 188 | |
|
189 | @util.propertycache | |
|
190 | def ui(self): | |
|
191 | return self._ui | |
|
192 | ||
|
193 | 189 | def url(self): |
|
194 | 190 | return self._path |
|
195 | 191 |
@@ -162,15 +162,11 b' class localpeer(repository.peer):' | |||
|
162 | 162 | if caps is None: |
|
163 | 163 | caps = moderncaps.copy() |
|
164 | 164 | self._repo = repo.filtered('served') |
|
165 |
self. |
|
|
165 | self.ui = repo.ui | |
|
166 | 166 | self._caps = repo._restrictcapabilities(caps) |
|
167 | 167 | |
|
168 | 168 | # Begin of _basepeer interface. |
|
169 | 169 | |
|
170 | @util.propertycache | |
|
171 | def ui(self): | |
|
172 | return self._ui | |
|
173 | ||
|
174 | 170 | def url(self): |
|
175 | 171 | return self._repo.url() |
|
176 | 172 |
@@ -354,7 +354,7 b' class sshv1peer(wireproto.wirepeer):' | |||
|
354 | 354 | stderr and to forward its output. |
|
355 | 355 | """ |
|
356 | 356 | self._url = url |
|
357 |
self. |
|
|
357 | self.ui = ui | |
|
358 | 358 | # self._subprocess is unused. Keeping a handle on the process |
|
359 | 359 | # holds a reference and prevents it from being garbage collected. |
|
360 | 360 | self._subprocess = proc |
@@ -379,10 +379,6 b' class sshv1peer(wireproto.wirepeer):' | |||
|
379 | 379 | |
|
380 | 380 | # Begin of ipeerconnection interface. |
|
381 | 381 | |
|
382 | @util.propertycache | |
|
383 | def ui(self): | |
|
384 | return self._ui | |
|
385 | ||
|
386 | 382 | def url(self): |
|
387 | 383 | return self._url |
|
388 | 384 |
@@ -32,11 +32,7 b" wireprototypes.TRANSPORTS['dummyproto'] " | |||
|
32 | 32 | class clientpeer(wireproto.wirepeer): |
|
33 | 33 | def __init__(self, serverrepo, ui): |
|
34 | 34 | self.serverrepo = serverrepo |
|
35 |
self. |
|
|
36 | ||
|
37 | @property | |
|
38 | def ui(self): | |
|
39 | return self._ui | |
|
35 | self.ui = ui | |
|
40 | 36 | |
|
41 | 37 | def url(self): |
|
42 | 38 | return b'test' |
General Comments 0
You need to be logged in to leave comments.
Login now