equal
deleted
inserted
replaced
11 stringio = util.stringio |
11 stringio = util.stringio |
12 |
12 |
13 class proto(object): |
13 class proto(object): |
14 def __init__(self, args): |
14 def __init__(self, args): |
15 self.args = args |
15 self.args = args |
|
16 self.name = 'dummyproto' |
|
17 |
16 def getargs(self, spec): |
18 def getargs(self, spec): |
17 args = self.args |
19 args = self.args |
18 args.setdefault(b'*', {}) |
20 args.setdefault(b'*', {}) |
19 names = spec.split() |
21 names = spec.split() |
20 return [args[n] for n in names] |
22 return [args[n] for n in names] |
21 |
23 |
22 def checkperm(self, perm): |
24 def checkperm(self, perm): |
23 pass |
25 pass |
|
26 |
|
27 wireprototypes.TRANSPORTS['dummyproto'] = { |
|
28 'transport': 'dummy', |
|
29 'version': 1, |
|
30 } |
24 |
31 |
25 class clientpeer(wireproto.wirepeer): |
32 class clientpeer(wireproto.wirepeer): |
26 def __init__(self, serverrepo, ui): |
33 def __init__(self, serverrepo, ui): |
27 self.serverrepo = serverrepo |
34 self.serverrepo = serverrepo |
28 self._ui = ui |
35 self._ui = ui |