~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

(jameinel) (bug #780544) when updating the WT,
 allow it to be done with a fast delta,
 rather than setting the state from scratch. (John A Meinel)

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,
35
36
    vf_repository,
36
37
    )
37
38
from bzrlib.branch import BranchReferenceFormat, BranchWriteLockResult
1605
1606
    @needs_read_lock
1606
1607
    def search_missing_revision_ids(self, other,
1607
1608
            revision_id=symbol_versioning.DEPRECATED_PARAMETER,
1608
 
            find_ghosts=True, revision_ids=None, if_present_ids=None,
1609
 
            limit=None):
 
1609
            find_ghosts=True, revision_ids=None, if_present_ids=None):
1610
1610
        """Return the revision ids that other has that this does not.
1611
1611
 
1612
1612
        These are returned in topological order.
1626
1626
        inter_repo = _mod_repository.InterRepository.get(other, self)
1627
1627
        return inter_repo.search_missing_revision_ids(
1628
1628
            find_ghosts=find_ghosts, revision_ids=revision_ids,
1629
 
            if_present_ids=if_present_ids, limit=limit)
 
1629
            if_present_ids=if_present_ids)
1630
1630
 
1631
1631
    def fetch(self, source, revision_id=None, find_ghosts=False,
1632
1632
            fetch_spec=None):
1660
1660
        self._real_repository.create_bundle(target, base, fileobj, format)
1661
1661
 
1662
1662
    @needs_read_lock
1663
 
    @symbol_versioning.deprecated_method(
1664
 
        symbol_versioning.deprecated_in((2, 4, 0)))
1665
1663
    def get_ancestry(self, revision_id, topo_sorted=True):
1666
1664
        self._ensure_real()
1667
1665
        return self._real_repository.get_ancestry(revision_id, topo_sorted)
1975
1973
    def supports_rich_root(self):
1976
1974
        return self._format.rich_root_data
1977
1975
 
1978
 
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
1979
1976
    def iter_reverse_revision_history(self, revision_id):
1980
1977
        self._ensure_real()
1981
1978
        return self._real_repository.iter_reverse_revision_history(revision_id)
3103
3100
        """
3104
3101
        try:
3105
3102
            configobj = self._get_configobj()
3106
 
            section_obj = None
3107
3103
            if section is None:
3108
3104
                section_obj = configobj
3109
3105
            else:
3110
3106
                try:
3111
3107
                    section_obj = configobj[section]
3112
3108
                except KeyError:
3113
 
                    pass
3114
 
            if section_obj is None:
3115
 
                value = default
3116
 
            else:
3117
 
                value = section_obj.get(name, default)
 
3109
                    return default
 
3110
            return section_obj.get(name, default)
3118
3111
        except errors.UnknownSmartMethod:
3119
 
            value = self._vfs_get_option(name, section, default)
3120
 
        for hook in config.OldConfigHooks['get']:
3121
 
            hook(self, name, value)
3122
 
        return value
 
3112
            return self._vfs_get_option(name, section, default)
3123
3113
 
3124
3114
    def _response_to_configobj(self, response):
3125
3115
        if len(response[0]) and response[0][0] != 'ok':
3126
3116
            raise errors.UnexpectedSmartServerResponse(response)
3127
3117
        lines = response[1].read_body_bytes().splitlines()
3128
 
        conf = config.ConfigObj(lines, encoding='utf-8')
3129
 
        for hook in config.OldConfigHooks['load']:
3130
 
            hook(self)
3131
 
        return conf
 
3118
        return config.ConfigObj(lines, encoding='utf-8')
3132
3119
 
3133
3120
 
3134
3121
class RemoteBranchConfig(RemoteConfig):