~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

(jelmer) Convert 'Branch.append_revisions_only' over to using config stacks.
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
663
663
        """
664
664
        if not self._format.supports_set_append_revisions_only():
665
665
            return False
666
 
        return self.get_config(
667
 
            ).get_user_option_as_bool('append_revisions_only')
 
666
        return self.get_config_stack().get('append_revisions_only')
668
667
 
669
668
    def set_append_revisions_only(self, enabled):
670
669
        if not self._format.supports_set_append_revisions_only():
671
670
            raise errors.UpgradeRequired(self.user_url)
672
 
        if enabled:
673
 
            value = 'True'
674
 
        else:
675
 
            value = 'False'
676
 
        self.get_config().set_user_option('append_revisions_only', value,
677
 
            warn_masked=True)
 
671
        self.get_config_stack().set('append_revisions_only', enabled)
678
672
 
679
673
    def set_reference_info(self, file_id, tree_path, branch_location):
680
674
        """Set the branch location to use for a tree reference."""