~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/bzrdir.py

Various hopefully improvements, but wsgi is broken, handing over to spiv :).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
 
20
20
from bzrlib import errors
21
 
from bzrlib.bzrdir import BzrDir
 
21
from bzrlib.bzrdir import BzrDir, BzrDirFormat
22
22
from bzrlib.smart.request import SmartServerRequest, SmartServerResponse
23
23
 
24
24
 
49
49
            return SmartServerResponse(('norepository', ))
50
50
 
51
51
 
 
52
class SmartServerRequestInitializeBzrDir(SmartServerRequest):
 
53
 
 
54
    def do(self, path):
 
55
        """Initialize a bzrdir at path.
 
56
 
 
57
        The default format of the server is used.
 
58
        :return: SmartServerResponse(('ok', ))
 
59
        """
 
60
        target_transport = self._backing_transport.clone(path)
 
61
        BzrDirFormat.get_default_format().initialize_on_transport(target_transport)
 
62
        return SmartServerResponse(('ok', ))
 
63
 
 
64
 
52
65
class SmartServerRequestOpenBranch(SmartServerRequest):
53
66
 
54
67
    def do(self, path):