/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/repofmt/pack_repo.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:06:46 UTC
  • mfrom: (6673 work)
  • mto: This revision was merged to the branch mainline in revision 6675.
  • Revision ID: jelmer@jelmer.uk-20170610000646-xj6jh277lo4xuo10
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
from ..lock import LogicalLockResult
57
57
from ..repository import (
58
58
    _LazyListJoin,
 
59
    RepositoryWriteLockResult,
 
60
    )
 
61
from ..bzrrepository import (
59
62
    MetaDirRepository,
60
63
    RepositoryFormatMetaDir,
61
 
    RepositoryWriteLockResult,
62
64
    )
63
65
from ..sixish import (
64
66
    reraise,
65
 
)
 
67
    )
66
68
from ..vf_repository import (
67
69
    MetaDirVersionedFileRepository,
68
70
    MetaDirVersionedFileRepositoryFormat,
1288
1290
 
1289
1291
    def _remove_pack_indices(self, pack, ignore_missing=False):
1290
1292
        """Remove the indices for pack from the aggregated indices.
1291
 
        
 
1293
 
1292
1294
        :param ignore_missing: Suppress KeyErrors from calling remove_index.
1293
1295
        """
1294
 
        for index_type in Pack.index_definitions.keys():
 
1296
        for index_type in Pack.index_definitions:
1295
1297
            attr_name = index_type + '_index'
1296
1298
            aggregate_index = getattr(self, attr_name)
1297
1299
            if aggregate_index is not None:
1344
1346
 
1345
1347
        # do a two-way diff against our original content
1346
1348
        current_nodes = set()
1347
 
        for name, sizes in self._names.iteritems():
 
1349
        for name, sizes in self._names.items():
1348
1350
            current_nodes.add(
1349
1351
                ((name, ), ' '.join(str(size) for size in sizes)))
1350
1352