~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_pack_repository.py

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2008-2011 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
19
19
These tests are repeated for all pack-based repository formats.
20
20
"""
21
21
 
22
 
from cStringIO import StringIO
23
22
from stat import S_ISDIR
24
23
 
25
24
from bzrlib.btree_index import BTreeGraphIndex
29
28
    errors,
30
29
    inventory,
31
30
    osutils,
32
 
    progress,
33
31
    repository,
34
32
    revision as _mod_revision,
35
 
    symbol_versioning,
36
33
    tests,
 
34
    transport,
37
35
    ui,
38
 
    upgrade,
39
 
    workingtree,
40
 
    )
41
 
from bzrlib.repofmt import (
42
 
    pack_repo,
43
 
    groupcompress_repo,
44
36
    )
45
37
from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a
46
38
from bzrlib.smart import (
47
39
    client,
48
40
    )
49
41
from bzrlib.tests import (
50
 
    TestCase,
51
42
    TestCaseWithTransport,
52
43
    TestNotApplicable,
53
 
    TestSkipped,
54
44
    )
55
45
from bzrlib.transport import (
56
 
    get_transport,
57
46
    memory,
58
47
    )
59
48
from bzrlib.tests import test_server
60
 
from bzrlib.tests.per_repository import TestCaseWithRepository
61
49
 
62
50
 
63
51
class TestPackRepository(TestCaseWithTransport):
278
266
        format = self.get_format()
279
267
        server = test_server.FakeNFSServer()
280
268
        self.start_server(server)
281
 
        transport = get_transport(server.get_url())
282
 
        bzrdir = self.get_format().initialize_on_transport(transport)
 
269
        t = transport.get_transport(server.get_url())
 
270
        bzrdir = self.get_format().initialize_on_transport(t)
283
271
        repo = bzrdir.create_repository()
284
272
        repo_transport = bzrdir.get_repository_transport(None)
285
273
        self.assertTrue(repo_transport.has('obsolete_packs'))