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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    errors,
25
25
    revision,
26
26
    )
27
 
from .sixish import (
28
 
    viewitems,
29
 
    )
30
27
 
31
28
 
32
29
class BranchBuilder(object):
48
45
    ...     ('add', ('', b'root-id', 'directory', '')),
49
46
    ...     ('add', ('filename', b'f-id', 'file', b'content\n'))],
50
47
    ...     revision_id=b'rev-id')
51
 
    'rev-id'
 
48
    b'rev-id'
52
49
    >>> builder.build_snapshot([b'rev-id'],
53
50
    ...     [('modify', ('filename', b'new-content\n'))],
54
51
    ...     revision_id=b'rev2-id')
55
 
    'rev2-id'
 
52
    b'rev2-id'
56
53
    >>> builder.finish_series()
57
54
    >>> branch = builder.get_branch()
58
55
 
275
272
            tree.unversion(pending.to_unversion_paths)
276
273
        tree.add(pending.to_add_files, pending.to_add_file_ids,
277
274
                 pending.to_add_kinds)
278
 
        for path, content in viewitems(pending.new_contents):
 
275
        for path, content in pending.new_contents.items():
279
276
            tree.put_file_bytes_non_atomic(path, content)
280
277
 
281
278
    def get_branch(self):