def start_auth(self, data): # ( success ( ( ANONYMOUS ) 36:40435d67-9594-4fb4-bb67-394e327d0cc5 ) ) self.request_uri = data[1][2] self.repository = Repository.get_by_uri(self.request_uri) self.send_and_receive( Success([literal('ANONYMOUS')], self.repository.id), self.auth2)
def start_auth(self, data): # ( success ( ( ANONYMOUS ) 36:40435d67-9594-4fb4-bb67-394e327d0cc5 ) ) self.request_uri = data[1][2] self.repository = Repository.get_by_uri(self.request_uri) self.send_and_receive( Success([literal('ANONYMOUS')], self.repository.id), self.auth2 )
#!/usr/bin/env python from datetime import datetime from svnserve.protocol import literal, decode from svnserve.responses import Response, Success from svnserve.exceptions import SvnException, CommandNotImplemented # Create and register the testrepo from svnserve.objects import InMemoryRepository as Repository Repository.create('/testrepo', 'ce6d8bb6-6b7a-4cb9-bf0c-f346bb840b97') class Request(object): MAX_RECV = 1048576 # 1MB def __init__(self, client): self.client = client def send(self, data): self.send_raw(str(data)) def send_raw(self, data): print("\x1b[35m>>> %s\x1b[0m" % data) self.client.send(data) def read(self, callback): data = self.client.recv(self.MAX_RECV + 1) if len(data) > self.MAX_RECV: self.send_and_end(SvnException('Message exceeded maximum length: {0} bytes'.format(self.MAX_RECV))) return
#!/usr/bin/env python from datetime import datetime from svnserve.protocol import literal, decode from svnserve.responses import Response, Success from svnserve.exceptions import SvnException, CommandNotImplemented # Create and register the testrepo from svnserve.objects import InMemoryRepository as Repository Repository.create('/testrepo', 'ce6d8bb6-6b7a-4cb9-bf0c-f346bb840b97') class Request(object): MAX_RECV = 1048576 # 1MB def __init__(self, client): self.client = client def send(self, data): self.send_raw(str(data)) def send_raw(self, data): print("\x1b[35m>>> %s\x1b[0m" % data) self.client.send(data) def read(self, callback): data = self.client.recv(self.MAX_RECV + 1) if len(data) > self.MAX_RECV: self.send_and_end( SvnException(