~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-03-01 03:08:30 UTC
  • mfrom: (2305 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2307.
  • Revision ID: aaron.bentley@utoronto.ca-20070301030830-xpgobtx029lmo57h
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1233
1233
            existing_bzrdir = bzrdir.BzrDir.open(location)
1234
1234
        except errors.NotBranchError:
1235
1235
            # really a NotBzrDir error...
1236
 
            branch = bzrdir.BzrDir.create_branch_convenience(location,
 
1236
            branch = bzrdir.BzrDir.create_branch_convenience(to_transport.base,
1237
1237
                                                             format=format)
1238
1238
        else:
1239
1239
            from bzrlib.transport.local import LocalTransport
2332
2332
 
2333
2333
    @display_command
2334
2334
    def run(self):
2335
 
        print "it sure does!"
 
2335
        print "It sure does!"
2336
2336
 
2337
2337
 
2338
2338
class cmd_find_merge_base(Command):
3128
3128
        Option('port',
3129
3129
               help='listen for connections on nominated port of the form '
3130
3130
                    '[hostname:]portnumber. Passing 0 as the port number will '
3131
 
                    'result in a dynamically allocated port.',
 
3131
                    'result in a dynamically allocated port. Default port is '
 
3132
                    '4155.',
3132
3133
               type=str),
3133
3134
        Option('directory',
3134
3135
               help='serve contents of directory',
3151
3152
        t = get_transport(url)
3152
3153
        if inet:
3153
3154
            server = smart.SmartServerPipeStreamMedium(sys.stdin, sys.stdout, t)
3154
 
        elif port is not None:
3155
 
            if ':' in port:
3156
 
                host, port = port.split(':')
3157
 
            else:
 
3155
        else:
 
3156
            if port is None:
 
3157
                port = smart.BZR_DEFAULT_PORT
3158
3158
                host = '127.0.0.1'
3159
 
            server = smart.SmartTCPServer(t, host=host, port=int(port))
 
3159
            else:
 
3160
                if ':' in port:
 
3161
                    host, port = port.split(':')
 
3162
                else:
 
3163
                    host = '127.0.0.1'
 
3164
                port = int(port)
 
3165
            server = smart.SmartTCPServer(t, host=host, port=port)
3160
3166
            print 'listening on port: ', server.port
3161
3167
            sys.stdout.flush()
3162
 
        else:
3163
 
            raise errors.BzrCommandError("bzr serve requires one of --inet or --port")
3164
3168
        server.serve()
3165
3169
 
3166
3170