~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/server.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-24 18:26:21 UTC
  • mfrom: (4567 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4568.
  • Revision ID: john@arbash-meinel.com-20090724182621-68s2jhoqf3pn72n7
Merge bzr.dev 4567 to resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
            pass
112
112
        for hook in SmartTCPServer.hooks['server_started']:
113
113
            hook(backing_urls, self.get_url())
 
114
        for hook in SmartTCPServer.hooks['server_started_ex']:
 
115
            hook(backing_urls, self)
114
116
        self._started.set()
115
117
        try:
116
118
            try:
214
216
            "where backing_url is a list of URLs giving the "
215
217
            "server-specific directory locations, and public_url is the "
216
218
            "public URL for the directory being served.", (0, 16), None))
 
219
        self.create_hook(HookPoint('server_started_ex',
 
220
            "Called by the bzr server when it starts serving a directory. "
 
221
            "server_started is called with (backing_urls, server_obj).",
 
222
            (1, 17), None))
217
223
        self.create_hook(HookPoint('server_stopped',
218
224
            "Called by the bzr server when it stops serving a directory. "
219
225
            "server_stopped is called with the same parameters as the "
313
319
    from bzrlib.transport.chroot import ChrootServer
314
320
    chroot_server = ChrootServer(transport)
315
321
    chroot_server.setUp()
316
 
    t = get_transport(chroot_server.get_url())
 
322
    transport = get_transport(chroot_server.get_url())
317
323
    if inet:
318
324
        smart_server = medium.SmartServerPipeStreamMedium(
319
325
            sys.stdin, sys.stdout, transport)
322
328
            host = medium.BZR_DEFAULT_INTERFACE
323
329
        if port is None:
324
330
            port = medium.BZR_DEFAULT_PORT
325
 
        smart_server = SmartTCPServer(
326
 
            transport, host=host, port=port)
 
331
        smart_server = SmartTCPServer(transport, host=host, port=port)
327
332
        trace.note('listening on port: %s' % smart_server.port)
328
333
    # For the duration of this server, no UI output is permitted. note
329
334
    # that this may cause problems with blackbox tests. This should be