/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-03 23:21:15 UTC
  • mfrom: (7290.42.6 paramiko-compat)
  • Revision ID: breezy.the.bot@gmail.com-20200203232115-g7k11bhsfeiqcprv
Fix compatibility with newer versions of paramiko, which break on noise before keys in pem files.

Merged from https://code.launchpad.net/~jelmer/brz/paramiko-compat/+merge/378480

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