/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

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 08:58:15 UTC
  • mfrom: (5609.48.2 2.3)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706085815-6leauod52jq2u43d
MergingĀ inĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2009, 2010 Canonical 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
21
21
from StringIO import StringIO
22
22
import re
23
23
 
24
 
import bzrlib.errors as errors
 
24
from bzrlib import (
 
25
    errors,
 
26
    pyutils,
 
27
    )
25
28
from bzrlib.diff import internal_diff
26
29
from bzrlib.revision import NULL_REVISION
27
30
# For backwards-compatibility
151
154
        """
152
155
        raise NotImplementedError
153
156
 
154
 
    def write(self, source, revision_ids, forced_bases, f):
155
 
        """Write the bundle to the supplied file.
156
 
 
157
 
        DEPRECATED: see write_bundle
158
 
        :param source: A source for revision information
159
 
        :param revision_ids: The list of revision ids to serialize
160
 
        :param forced_bases: A dict of revision -> base that overrides default
161
 
        :param f: The file to output to
162
 
        """
163
 
        raise NotImplementedError
164
 
 
165
157
    def _write_bundle(self, repository, revision_id, base_revision_id, out):
166
158
        """Helper function for translating write_bundle to write"""
167
159
        forced_bases = {revision_id:base_revision_id}
202
194
    :param overwrite: Should this version override a default
203
195
    """
204
196
    def _loader(version):
205
 
        mod = __import__(module, globals(), locals(), [classname])
206
 
        klass = getattr(mod, classname)
 
197
        klass = pyutils.get_named_object(module, classname)
207
198
        return klass(version)
208
199
    register(version, _loader, overwrite=overwrite)
209
200