~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2007-04-11 01:29:20 UTC
  • mfrom: (2402 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2403.
  • Revision ID: john@arbash-meinel.com-20070411012920-wnp7rnqdwe13xmhx
[merge] bzr.dev 2402

Show diffs side-by-side

added added

removed removed

Lines of Context:
3224
3224
        ]
3225
3225
 
3226
3226
    def run(self, port=None, inet=False, directory=None, allow_writes=False):
3227
 
        from bzrlib.transport import smart
 
3227
        from bzrlib.smart import server, medium
3228
3228
        from bzrlib.transport import get_transport
 
3229
        from bzrlib.transport.remote import BZR_DEFAULT_PORT
3229
3230
        if directory is None:
3230
3231
            directory = os.getcwd()
3231
3232
        url = urlutils.local_path_to_url(directory)
3233
3234
            url = 'readonly+' + url
3234
3235
        t = get_transport(url)
3235
3236
        if inet:
3236
 
            server = smart.SmartServerPipeStreamMedium(sys.stdin, sys.stdout, t)
 
3237
            smart_server = medium.SmartServerPipeStreamMedium(
 
3238
                sys.stdin, sys.stdout, t)
3237
3239
        else:
3238
3240
            if port is None:
3239
 
                port = smart.BZR_DEFAULT_PORT
 
3241
                port = BZR_DEFAULT_PORT
3240
3242
                host = '127.0.0.1'
3241
3243
            else:
3242
3244
                if ':' in port:
3244
3246
                else:
3245
3247
                    host = '127.0.0.1'
3246
3248
                port = int(port)
3247
 
            server = smart.SmartTCPServer(t, host=host, port=port)
3248
 
            print 'listening on port: ', server.port
 
3249
            smart_server = server.SmartTCPServer(t, host=host, port=port)
 
3250
            print 'listening on port: ', smart_server.port
3249
3251
            sys.stdout.flush()
3250
 
        server.serve()
 
3252
        smart_server.serve()
3251
3253
 
3252
3254
class cmd_join(Command):
3253
3255
    """Combine a subtree into its containing tree.