~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2010-11-05 20:54:32 UTC
  • mfrom: (5526 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5527.
  • Revision ID: john@arbash-meinel.com-20101105205432-rmyozu8sthyhmri8
Merge bzr.dev to resolve bzr-2.3.txt (aka NEWS)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    lockdir,
40
40
    lru_cache,
41
41
    osutils,
 
42
    pyutils,
42
43
    revision as _mod_revision,
43
44
    static_tuple,
44
45
    symbol_versioning,
52
53
from bzrlib.testament import Testament
53
54
""")
54
55
 
 
56
import sys
55
57
from bzrlib import (
56
58
    errors,
57
59
    registry,
113
115
 
114
116
        if committer is None:
115
117
            self._committer = self._config.username()
 
118
        elif not isinstance(committer, unicode):
 
119
            self._committer = committer.decode() # throw if non-ascii
116
120
        else:
117
121
            self._committer = committer
118
122
 
2825
2829
            % (name, from_module),
2826
2830
            DeprecationWarning,
2827
2831
            stacklevel=2)
2828
 
        m = __import__(from_module, globals(), locals(), [name])
2829
2832
        try:
2830
 
            return getattr(m, name)
 
2833
            return pyutils.get_named_object(from_module, name)
2831
2834
        except AttributeError:
2832
2835
            raise AttributeError('module %s has no name %s'
2833
 
                    % (m, name))
 
2836
                    % (sys.modules[from_module], name))
2834
2837
    globals()[name] = _deprecated_repository_forwarder
2835
2838
 
2836
2839
for _name in [