~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2007-04-23 04:38:50 UTC
  • mto: This revision was merged to the branch mainline in revision 2445.
  • Revision ID: robertc@robertcollins.net-20070423043850-syh9c5j0evr48gam
``bzr serve`` now listens on interface 0.0.0.0 by default, making it serve
out to the local LAN and fixing bug 98918. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3291
3291
        from bzrlib.smart import medium, server
3292
3292
        from bzrlib.transport import get_transport
3293
3293
        from bzrlib.transport.chroot import ChrootServer
3294
 
        from bzrlib.transport.remote import BZR_DEFAULT_PORT
 
3294
        from bzrlib.transport.remote import BZR_DEFAULT_PORT, BZR_DEFAULT_INTERFACE
3295
3295
        if directory is None:
3296
3296
            directory = os.getcwd()
3297
3297
        url = urlutils.local_path_to_url(directory)
3304
3304
            smart_server = medium.SmartServerPipeStreamMedium(
3305
3305
                sys.stdin, sys.stdout, t)
3306
3306
        else:
 
3307
            host = BZR_DEFAULT_INTERFACE
3307
3308
            if port is None:
3308
3309
                port = BZR_DEFAULT_PORT
3309
 
                host = '127.0.0.1'
3310
3310
            else:
3311
3311
                if ':' in port:
3312
3312
                    host, port = port.split(':')
3313
 
                else:
3314
 
                    host = '127.0.0.1'
3315
3313
                port = int(port)
3316
3314
            smart_server = server.SmartTCPServer(t, host=host, port=port)
3317
3315
            print 'listening on port: ', smart_server.port