/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Andrew Bennetts
  • Date: 2010-02-12 04:33:05 UTC
  • mfrom: (5031 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5032.
  • Revision ID: andrew.bennetts@canonical.com-20100212043305-ujdbsdoviql2t7i3
MergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
from bzrlib.transport import LateReadError
40
40
""")
41
41
 
42
 
from bzrlib.transport import Transport, Server
 
42
from bzrlib import transport
43
43
 
44
44
 
45
45
_append_flags = os.O_CREAT | os.O_APPEND | os.O_WRONLY | osutils.O_BINARY
46
46
_put_non_atomic_flags = os.O_CREAT | os.O_TRUNC | os.O_WRONLY | osutils.O_BINARY
47
47
 
48
48
 
49
 
class LocalTransport(Transport):
 
49
class LocalTransport(transport.Transport):
50
50
    """This is the transport agent for local filesystem access."""
51
51
 
52
52
    def __init__(self, base):
554
554
            return EmulatedWin32LocalTransport(abspath)
555
555
 
556
556
 
557
 
class LocalURLServer(Server):
558
 
    """A pretend server for local transports, using file:// urls.
559
 
 
560
 
    Of course no actual server is required to access the local filesystem, so
561
 
    this just exists to tell the test code how to get to it.
562
 
    """
563
 
 
564
 
    def setUp(self):
565
 
        """Setup the server to service requests.
566
 
 
567
 
        :param decorated_transport: ignored by this implementation.
568
 
        """
569
 
 
570
 
    def get_url(self):
571
 
        """See Transport.Server.get_url."""
572
 
        return urlutils.local_path_to_url('')
573
 
 
574
 
 
575
557
def get_test_permutations():
576
558
    """Return the permutations to be used in testing."""
577
 
    return [
578
 
            (LocalTransport, LocalURLServer),
579
 
            ]
 
559
    from bzrlib.tests import test_server
 
560
    return [(LocalTransport, test_server.LocalURLServer),]