/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: 2018-07-07 19:27:38 UTC
  • mto: (7027.4.10 python3-blackbox)
  • mto: This revision was merged to the branch mainline in revision 7038.
  • Revision ID: jelmer@jelmer.uk-20180707192738-cbt5f28lbd3lx4td
Add some more bees; support writing both bytes and unicode strings in build_tree_contents.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    >>> builder.start_series()
48
48
    >>> builder.build_snapshot(None, [
49
49
    ...     ('add', ('', b'root-id', 'directory', '')),
50
 
    ...     ('add', ('filename', b'f-id', 'file', 'content\n'))],
 
50
    ...     ('add', ('filename', b'f-id', 'file', b'content\n'))],
51
51
    ...     revision_id=b'rev-id')
52
52
    'rev-id'
53
53
    >>> builder.build_snapshot([b'rev-id'],
54
 
    ...     [('modify', (b'f-id', 'new-content\n'))],
 
54
    ...     [('modify', (b'f-id', b'new-content\n'))],
55
55
    ...     revision_id=b'rev2-id')
56
56
    'rev2-id'
57
57
    >>> builder.finish_series()
187
187
        :param parent_ids: A list of parent_ids to use for the commit.
188
188
            It can be None, which indicates to use the last commit.
189
189
        :param actions: A list of actions to perform. Supported actions are:
190
 
            ('add', ('path', b'file-id', 'kind', 'content' or None))
191
 
            ('modify', ('path', 'new-content'))
 
190
            ('add', ('path', b'file-id', 'kind', b'content' or None))
 
191
            ('modify', ('path', b'new-content'))
192
192
            ('unversion', 'path')
193
193
            ('rename', ('orig-path', 'new-path'))
194
194
            ('flush', None)