/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/config.py

  • Committer: Jelmer Vernooij
  • Date: 2020-06-23 01:02:30 UTC
  • mfrom: (7490.40.27 work)
  • mto: This revision was merged to the branch mainline in revision 7517.
  • Revision ID: jelmer@jelmer.uk-20200623010230-62nnywznmb76h6ut
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
import stat
91
91
 
92
92
from breezy import (
93
 
    atomicfile,
94
93
    cmdline,
95
94
    controldir,
96
95
    debug,
903
902
    def _write_config_file(self):
904
903
        if self.file_name is None:
905
904
            raise AssertionError('We cannot save, self.file_name is None')
 
905
        from . import atomicfile
906
906
        conf_dir = os.path.dirname(self.file_name)
907
907
        bedding.ensure_config_dir_exists(conf_dir)
908
908
        with atomicfile.AtomicFile(self.file_name) as atomic_file:
2902
2902
            try:
2903
2903
                name, value = over.split('=', 1)
2904
2904
            except ValueError:
2905
 
                raise errors.BzrCommandError(
 
2905
                raise errors.CommandError(
2906
2906
                    gettext("Invalid '%s', should be of the form 'name=value'")
2907
2907
                    % (over,))
2908
2908
            self.options[name] = value
4003
4003
 
4004
4004
    def _remove_config_option(self, name, directory, scope):
4005
4005
        if name is None:
4006
 
            raise errors.BzrCommandError(
 
4006
            raise errors.CommandError(
4007
4007
                '--remove expects an option to remove.')
4008
4008
        conf = self._get_stack(directory, scope, write_access=True)
4009
4009
        try: