/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 bzrlib/bundle/serializer/__init__.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# (C) 2005 Canonical Development Ltd
 
1
# (C) 2005-2006 Canonical Development Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
96
96
        source.unlock()
97
97
 
98
98
 
99
 
def write_bundle(repository, revision_id, base_revision_id, out):
 
99
def write_bundle(repository, revision_id, base_revision_id, out, format=None):
100
100
    """"""
101
101
    repository.lock_read()
102
102
    try:
103
 
        return _write_bundle(repository, revision_id, base_revision_id, out)
 
103
        return _write_bundle(repository, revision_id, base_revision_id, out,
 
104
                             format)
104
105
    finally:
105
106
        repository.unlock()
106
107
 
107
108
 
108
 
def _write_bundle(repository, revision_id, base_revision_id, out):
 
109
def _write_bundle(repository, revision_id, base_revision_id, out, format):
109
110
    """Write a bundle of revisions.
110
111
 
111
112
    :param repository: Repository containing revisions to serialize.
120
121
    revision_ids = [r for r in repository.get_ancestry(revision_id) if r
121
122
                    not in base_ancestry]
122
123
    revision_ids = list(reversed(revision_ids))
123
 
    write(repository, revision_ids, out, 
 
124
    write(repository, revision_ids, out, format,
124
125
          forced_bases = {revision_id:base_revision_id})
125
126
    return revision_ids
126
127
 
296
297
    to_file.write('\n')
297
298
 
298
299
register_lazy('0.8', 'bzrlib.bundle.serializer.v08', 'BundleSerializerV08')
 
300
register_lazy('0.9', 'bzrlib.bundle.serializer.v09', 'BundleSerializerV09')
299
301
register_lazy(None, 'bzrlib.bundle.serializer.v08', 'BundleSerializerV08')
300
302