~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-27 15:42:09 UTC
  • mfrom: (5993 +trunk)
  • mto: (5993.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5994.
  • Revision ID: v.ladeuil+lp@free.fr-20110627154209-azubuhbuxsz109hq
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    static_tuple,
33
33
    symbol_versioning,
34
34
    urlutils,
35
 
    versionedfile,
36
35
    vf_repository,
37
36
    )
38
37
from bzrlib.branch import BranchReferenceFormat, BranchWriteLockResult
1661
1660
        self._real_repository.create_bundle(target, base, fileobj, format)
1662
1661
 
1663
1662
    @needs_read_lock
 
1663
    @symbol_versioning.deprecated_method(
 
1664
        symbol_versioning.deprecated_in((2, 4, 0)))
1664
1665
    def get_ancestry(self, revision_id, topo_sorted=True):
1665
1666
        self._ensure_real()
1666
1667
        return self._real_repository.get_ancestry(revision_id, topo_sorted)
1974
1975
    def supports_rich_root(self):
1975
1976
        return self._format.rich_root_data
1976
1977
 
 
1978
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
1977
1979
    def iter_reverse_revision_history(self, revision_id):
1978
1980
        self._ensure_real()
1979
1981
        return self._real_repository.iter_reverse_revision_history(revision_id)
3101
3103
        """
3102
3104
        try:
3103
3105
            configobj = self._get_configobj()
 
3106
            section_obj = None
3104
3107
            if section is None:
3105
3108
                section_obj = configobj
3106
3109
            else:
3107
3110
                try:
3108
3111
                    section_obj = configobj[section]
3109
3112
                except KeyError:
3110
 
                    return default
3111
 
            return section_obj.get(name, default)
 
3113
                    pass
 
3114
            if section_obj is None:
 
3115
                value = default
 
3116
            else:
 
3117
                value = section_obj.get(name, default)
3112
3118
        except errors.UnknownSmartMethod:
3113
 
            return self._vfs_get_option(name, section, default)
 
3119
            value = self._vfs_get_option(name, section, default)
 
3120
        for hook in config.OldConfigHooks['get']:
 
3121
            hook(self, name, value)
 
3122
        return value
3114
3123
 
3115
3124
    def _response_to_configobj(self, response):
3116
3125
        if len(response[0]) and response[0][0] != 'ok':
3117
3126
            raise errors.UnexpectedSmartServerResponse(response)
3118
3127
        lines = response[1].read_body_bytes().splitlines()
3119
 
        return config.ConfigObj(lines, encoding='utf-8')
 
3128
        conf = config.ConfigObj(lines, encoding='utf-8')
 
3129
        for hook in config.OldConfigHooks['load']:
 
3130
            hook(self)
 
3131
        return conf
3120
3132
 
3121
3133
 
3122
3134
class RemoteBranchConfig(RemoteConfig):