Exemplo n.º 1
0
 def do(self, path):
     try:
         t = self.transport_from_client_path(path)
     except errors.PathNotChild:
         # The client is trying to ask about a path that they have no access
         # to.
         # Ideally we'd return a FailedSmartServerResponse here rather than
         # a "successful" negative, but we want to be compatibile with
         # clients that don't anticipate errors from this method.
         answer = 'no'
     else:
         bzr_prober = BzrProber()
         try:
             bzr_prober.probe_transport(t)
         except (errors.NotBranchError, errors.UnknownFormatError):
             answer = 'no'
         else:
             answer = 'yes'
     return SuccessfulSmartServerResponse((answer,))
Exemplo n.º 2
0
 def do(self, path):
     try:
         t = self.transport_from_client_path(path)
     except errors.PathNotChild:
         # The client is trying to ask about a path that they have no access
         # to.
         # Ideally we'd return a FailedSmartServerResponse here rather than
         # a "successful" negative, but we want to be compatibile with
         # clients that don't anticipate errors from this method.
         answer = 'no'
     else:
         bzr_prober = BzrProber()
         try:
             bzr_prober.probe_transport(t)
         except (errors.NotBranchError, errors.UnknownFormatError):
             answer = 'no'
         else:
             answer = 'yes'
     return SuccessfulSmartServerResponse((answer, ))
Exemplo n.º 3
0
 def probe_transport(klass, transport):
     klass.seen_urls.append(transport.base)
     return BzrProber.probe_transport(transport)
Exemplo n.º 4
0
 def probe_transport(klass, transport):
     klass.seen_urls.append(transport.base)
     return BzrProber.probe_transport(transport)