318 def commandexecutor(self): |
318 def commandexecutor(self): |
319 return localcommandexecutor(self) |
319 return localcommandexecutor(self) |
320 |
320 |
321 # End of peer interface. |
321 # End of peer interface. |
322 |
322 |
323 class locallegacypeer(repository.legacypeer, localpeer): |
323 @zi.implementer(repository.ipeerlegacycommands) |
|
324 class locallegacypeer(localpeer): |
324 '''peer extension which implements legacy methods too; used for tests with |
325 '''peer extension which implements legacy methods too; used for tests with |
325 restricted capabilities''' |
326 restricted capabilities''' |
326 |
327 |
327 def __init__(self, repo): |
328 def __init__(self, repo): |
328 super(locallegacypeer, self).__init__(repo, caps=legacycaps) |
329 super(locallegacypeer, self).__init__(repo, caps=legacycaps) |
333 return self._repo.between(pairs) |
334 return self._repo.between(pairs) |
334 |
335 |
335 def branches(self, nodes): |
336 def branches(self, nodes): |
336 return self._repo.branches(nodes) |
337 return self._repo.branches(nodes) |
337 |
338 |
338 def changegroup(self, basenodes, source): |
339 def changegroup(self, nodes, source): |
339 outgoing = discovery.outgoing(self._repo, missingroots=basenodes, |
340 outgoing = discovery.outgoing(self._repo, missingroots=nodes, |
340 missingheads=self._repo.heads()) |
341 missingheads=self._repo.heads()) |
341 return changegroup.makechangegroup(self._repo, outgoing, '01', source) |
342 return changegroup.makechangegroup(self._repo, outgoing, '01', source) |
342 |
343 |
343 def changegroupsubset(self, bases, heads, source): |
344 def changegroupsubset(self, bases, heads, source): |
344 outgoing = discovery.outgoing(self._repo, missingroots=bases, |
345 outgoing = discovery.outgoing(self._repo, missingroots=bases, |