~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-18 05:22:35 UTC
  • mfrom: (1551.15.27 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070618052235-mvns8j28szyzscy0
Turn list-weave into list-versionedfile

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    errors,
78
78
    osutils,
79
79
    symbol_versioning,
80
 
    trace,
81
80
    urlutils,
82
81
    win32utils,
83
82
    )
640
639
                return value
641
640
        return None
642
641
 
643
 
    def set_user_option(self, name, value, store=STORE_BRANCH,
644
 
        warn_masked=False):
 
642
    def set_user_option(self, name, value, store=STORE_BRANCH):
645
643
        if store == STORE_BRANCH:
646
644
            self._get_branch_data_config().set_option(value, name)
647
645
        elif store == STORE_GLOBAL:
648
646
            self._get_global_config().set_user_option(name, value)
649
647
        else:
650
648
            self._get_location_config().set_user_option(name, value, store)
651
 
        if not warn_masked:
652
 
            return
653
 
        if store in (STORE_GLOBAL, STORE_BRANCH):
654
 
            mask_value = self._get_location_config().get_user_option(name)
655
 
            if mask_value is not None:
656
 
                trace.warning('Value "%s" is masked by "%s" from'
657
 
                              ' locations.conf', value, mask_value)
658
 
            else:
659
 
                if store == STORE_GLOBAL:
660
 
                    branch_config = self._get_branch_data_config()
661
 
                    mask_value = branch_config.get_user_option(name)
662
 
                    if mask_value is not None:
663
 
                        trace.warning('Value "%s" is masked by "%s" from'
664
 
                                      ' branch.conf', value, mask_value)
665
 
 
666
649
 
667
650
    def _gpg_signing_command(self):
668
651
        """See Config.gpg_signing_command."""
869
852
            obj = self._get_config()
870
853
            try:
871
854
                if section is not None:
872
 
                    obj = obj[section]
 
855
                    obj[section]
873
856
                result = obj[name]
874
857
            except KeyError:
875
858
                result = default