/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/branch.py

  • Committer: Martin
  • Date: 2017-06-05 20:48:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6658.
  • Revision ID: gzlist@googlemail.com-20170605204831-20accykspjcrx0a8
Apply 2to3 dict fixer and clean up resulting mess using view helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
from .lock import _RelockDebugMixin, LogicalLockResult
67
67
from .sixish import (
68
68
    BytesIO,
 
69
    viewitems,
69
70
    )
70
71
from .trace import mutter, mutter_callsite, note, is_quiet
71
72
 
397
398
            return self.get_rev_id(revno[0])
398
399
        revision_id_to_revno = self.get_revision_id_to_revno_map()
399
400
        revision_ids = [revision_id for revision_id, this_revno
400
 
                        in revision_id_to_revno.iteritems()
 
401
                        in viewitems(revision_id_to_revno)
401
402
                        if revno == this_revno]
402
403
        if len(revision_ids) == 1:
403
404
            return revision_ids[0]
1330
1331
        old_base = self.base
1331
1332
        new_base = target.base
1332
1333
        target_reference_dict = target._get_all_reference_info()
1333
 
        for file_id, (tree_path, branch_location) in (
1334
 
            reference_dict.items()):
 
1334
        for file_id, (tree_path, branch_location) in viewitems(reference_dict):
1335
1335
            branch_location = urlutils.rebase_url(branch_location,
1336
1336
                                                  old_base, new_base)
1337
1337
            target_reference_dict.setdefault(
2735
2735
        """
2736
2736
        s = BytesIO()
2737
2737
        writer = rio.RioWriter(s)
2738
 
        for key, (tree_path, branch_location) in info_dict.iteritems():
 
2738
        for key, (tree_path, branch_location) in viewitems(info_dict):
2739
2739
            stanza = rio.Stanza(file_id=key, tree_path=tree_path,
2740
2740
                                branch_location=branch_location)
2741
2741
            writer.write_stanza(stanza)