~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-03 17:08:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6421.
  • Revision ID: jelmer@samba.org-20120103170829-e3dstkf2aqaeyoun
Fix compatibility after config stack changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    bencode,
24
24
    branch,
25
25
    bzrdir as _mod_bzrdir,
26
 
    config,
 
26
    config as _mod_config,
27
27
    controldir,
28
28
    debug,
29
29
    errors,
349
349
        _mod_bzrdir.BzrDirMetaFormat1._set_repository_format) #.im_func)
350
350
 
351
351
 
352
 
class RemoteControlStore(config.IniFileStore):
 
352
class RemoteControlStore(_mod_config.IniFileStore):
353
353
    """Control store which attempts to use HPSS calls to retrieve control store.
354
354
 
355
355
    Note that this is specific to bzr-based formats.
379
379
    def _ensure_real(self):
380
380
        self.bzrdir._ensure_real()
381
381
        if self._real_store is None:
382
 
            self._real_store = config.ControlStore(self.bzrdir)
 
382
            self._real_store = _mod_config.ControlStore(self.bzrdir)
383
383
 
384
384
    def external_url(self):
385
385
        return self.bzrdir.user_url
1846
1846
 
1847
1847
    def add_revision(self, revision_id, rev, inv=None, config=None):
1848
1848
        _mod_revision.check_not_reserved_id(revision_id)
1849
 
        if config is not None and config.signature_needed():
 
1849
        if (config is not None and
 
1850
            config.get('create_signatures') == _mod_config.SIGN_ALWAYS):
1850
1851
            if inv is None:
1851
1852
                inv = self.get_inventory(revision_id)
1852
1853
            tree = InventoryRevisionTree(self, inv, revision_id)
3205
3206
        return False
3206
3207
 
3207
3208
 
3208
 
class RemoteBranchStore(config.IniFileStore):
 
3209
class RemoteBranchStore(_mod_config.IniFileStore):
3209
3210
    """Branch store which attempts to use HPSS calls to retrieve branch store.
3210
3211
 
3211
3212
    Note that this is specific to bzr-based formats.
3263
3264
    def _ensure_real(self):
3264
3265
        self.branch._ensure_real()
3265
3266
        if self._real_store is None:
3266
 
            self._real_store = config.BranchStore(self.branch)
 
3267
            self._real_store = _mod_config.BranchStore(self.branch)
3267
3268
 
3268
3269
 
3269
3270
class RemoteBranch(branch.Branch, _RpcHelper, lock._RelockDebugMixin):
3968
3969
                value = section_obj.get(name, default)
3969
3970
        except errors.UnknownSmartMethod:
3970
3971
            value = self._vfs_get_option(name, section, default)
3971
 
        for hook in config.OldConfigHooks['get']:
 
3972
        for hook in _mod_config.OldConfigHooks['get']:
3972
3973
            hook(self, name, value)
3973
3974
        return value
3974
3975
 
3976
3977
        if len(response[0]) and response[0][0] != 'ok':
3977
3978
            raise errors.UnexpectedSmartServerResponse(response)
3978
3979
        lines = response[1].read_body_bytes().splitlines()
3979
 
        conf = config.ConfigObj(lines, encoding='utf-8')
3980
 
        for hook in config.OldConfigHooks['load']:
 
3980
        conf = _mod_config.ConfigObj(lines, encoding='utf-8')
 
3981
        for hook in _mod_config.OldConfigHooks['load']:
3981
3982
            hook(self)
3982
3983
        return conf
3983
3984