~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Martin Pool
  • Date: 2011-06-19 02:24:39 UTC
  • mfrom: (5985 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110619022439-u68683yb2bw302x0
resolve conflicts against trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1974
1974
    def supports_rich_root(self):
1975
1975
        return self._format.rich_root_data
1976
1976
 
 
1977
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
1977
1978
    def iter_reverse_revision_history(self, revision_id):
1978
1979
        self._ensure_real()
1979
1980
        return self._real_repository.iter_reverse_revision_history(revision_id)
3101
3102
        """
3102
3103
        try:
3103
3104
            configobj = self._get_configobj()
 
3105
            section_obj = None
3104
3106
            if section is None:
3105
3107
                section_obj = configobj
3106
3108
            else:
3107
3109
                try:
3108
3110
                    section_obj = configobj[section]
3109
3111
                except KeyError:
3110
 
                    return default
3111
 
            return section_obj.get(name, default)
 
3112
                    pass
 
3113
            if section_obj is None:
 
3114
                value = default
 
3115
            else:
 
3116
                value = section_obj.get(name, default)
3112
3117
        except errors.UnknownSmartMethod:
3113
 
            return self._vfs_get_option(name, section, default)
 
3118
            value = self._vfs_get_option(name, section, default)
 
3119
        for hook in config.OldConfigHooks['get']:
 
3120
            hook(self, name, value)
 
3121
        return value
3114
3122
 
3115
3123
    def _response_to_configobj(self, response):
3116
3124
        if len(response[0]) and response[0][0] != 'ok':
3117
3125
            raise errors.UnexpectedSmartServerResponse(response)
3118
3126
        lines = response[1].read_body_bytes().splitlines()
3119
 
        return config.ConfigObj(lines, encoding='utf-8')
 
3127
        conf = config.ConfigObj(lines, encoding='utf-8')
 
3128
        for hook in config.OldConfigHooks['load']:
 
3129
            hook(self)
 
3130
        return conf
3120
3131
 
3121
3132
 
3122
3133
class RemoteBranchConfig(RemoteConfig):