/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: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

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):