~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-01 00:36:13 UTC
  • mfrom: (2692.1.26 bug-124089)
  • Revision ID: pqm@pqm.ubuntu.com-20080401003613-w51tu4gd3yqogm8s
Add root_client_path parameter to SmartWSGIApp and
        SmartServerRequest. (Andrew Bennetts, #124089)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
 
29
29
class SmartServerBranchRequest(SmartServerRequest):
30
 
    """Base class for handling common branch request logic."""
 
30
    """Base class for handling common branch request logic.
 
31
    """
31
32
 
32
33
    def do(self, path, *args):
33
34
        """Execute a request for a branch at path.
 
35
    
 
36
        All Branch requests take a path to the branch as their first argument.
34
37
 
35
38
        If the branch is a branch reference, NotBranchError is raised.
 
39
 
 
40
        :param path: The path for the repository as received from the
 
41
            client.
 
42
        :return: A SmartServerResponse from self.do_with_branch().
36
43
        """
37
 
        transport = self._backing_transport.clone(path)
 
44
        transport = self.transport_from_client_path(path)
38
45
        bzrdir = BzrDir.open_from_transport(transport)
39
46
        if bzrdir.get_branch_reference() is not None:
40
47
            raise errors.NotBranchError(transport.base)