/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 breezy/tests/per_pack_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from stat import S_ISDIR
23
23
 
24
 
from breezy.btree_index import BTreeGraphIndex
25
 
from breezy.index import GraphIndex
26
 
from breezy import (
 
24
from ..btree_index import BTreeGraphIndex
 
25
from ..index import GraphIndex
 
26
from .. import (
27
27
    controldir,
28
28
    errors,
29
29
    inventory,
34
34
    transport,
35
35
    ui,
36
36
    )
37
 
from breezy.repofmt.groupcompress_repo import RepositoryFormat2a
38
 
from breezy.smart import (
 
37
from ..repofmt.groupcompress_repo import RepositoryFormat2a
 
38
from ..smart import (
39
39
    client,
40
40
    )
41
 
from breezy.tests import (
 
41
from . import (
42
42
    TestCaseWithTransport,
43
43
    TestNotApplicable,
44
44
    )
45
 
from breezy.transport import (
 
45
from ..transport import (
46
46
    memory,
47
47
    )
48
 
from breezy.tests import test_server
 
48
from . import test_server
49
49
 
50
50
 
51
51
class TestPackRepository(TestCaseWithTransport):
283
283
        """
284
284
        repo = self.make_repository('repo')
285
285
        pack_coll = repo._pack_collection
286
 
        indices = set([pack_coll.revision_index, pack_coll.inventory_index,
287
 
                pack_coll.text_index, pack_coll.signature_index])
 
286
        indices = {pack_coll.revision_index, pack_coll.inventory_index,
 
287
                pack_coll.text_index, pack_coll.signature_index}
288
288
        if pack_coll.chk_index is not None:
289
289
            indices.add(pack_coll.chk_index)
290
290
        combined_indices = set(idx.combined_index for idx in indices)
356
356
        # revision access tends to be tip->ancestor, so ordering that way on
357
357
        # disk is a good idea.
358
358
        for _1, key, val, refs in pack.revision_index.iter_all_entries():
359
 
            if type(format.repository_format) is RepositoryFormat2a:
 
359
            if isinstance(format.repository_format, RepositoryFormat2a):
360
360
                # group_start, group_len, internal_start, internal_len
361
361
                pos = map(int, val.split())
362
362
            else: