~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/memory.py

(jam) Have MemoryServer unregister itself on stop_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
27
27
from cStringIO import StringIO
28
28
import warnings
29
29
 
 
30
from bzrlib import (
 
31
    urlutils,
 
32
    )
30
33
from bzrlib.errors import (
31
34
    FileExists,
32
35
    LockError,
42
45
    register_transport,
43
46
    Server,
44
47
    Transport,
 
48
    unregister_transport,
45
49
    )
46
 
import bzrlib.urlutils as urlutils
47
50
 
48
51
 
49
52
 
314
317
            result._files = self._files
315
318
            result._locks = self._locks
316
319
            return result
317
 
        register_transport(self._scheme, memory_factory)
 
320
        self._memory_factory = memory_factory
 
321
        register_transport(self._scheme, self._memory_factory)
318
322
 
319
323
    def stop_server(self):
320
324
        # unregister this server
321
 
        # XXX: why isn't this done? -- mbp 20100106
322
 
        pass
 
325
        unregister_transport(self._scheme, self._memory_factory)
323
326
 
324
327
    def get_url(self):
325
328
        """See bzrlib.transport.Server.get_url."""