~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Jelmer Vernooij
  • Date: 2011-07-23 16:33:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6045.
  • Revision ID: jelmer@samba.org-20110723163338-mjox55g52kt3u922
Add get_transport_from_url and get_transport_from_path functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
log_format=name-of-format
32
32
validate_signatures_in_log=true|false(default)
33
33
acceptable_keys=pattern1,pattern2
 
34
gpg_signing_key=amy@example.com
34
35
 
35
36
in locations.conf, you specify the url of a branch and options for it.
36
37
Wildcards may be used - * and ? as normal in shell completion. Options
536
537
            return True
537
538
        return False
538
539
 
 
540
    def gpg_signing_key(self):
 
541
        """GPG user-id to sign commits"""
 
542
        key = self.get_user_option('gpg_signing_key')
 
543
        if key == "default" or key == None:
 
544
            return self.user_email()
 
545
        else:
 
546
            return key
 
547
 
539
548
    def get_alias(self, value):
540
549
        return self._get_alias(value)
541
550
 
2553
2562
class GlobalStore(LockableIniFileStore):
2554
2563
 
2555
2564
    def __init__(self, possible_transports=None):
2556
 
        t = transport.get_transport(config_dir(),
 
2565
        t = transport.get_transport_from_path(config_dir(),
2557
2566
                                    possible_transports=possible_transports)
2558
2567
        super(GlobalStore, self).__init__(t, 'bazaar.conf')
2559
2568
 
2561
2570
class LocationStore(LockableIniFileStore):
2562
2571
 
2563
2572
    def __init__(self, possible_transports=None):
2564
 
        t = transport.get_transport(config_dir(),
 
2573
        t = transport.get_transport_from_path(config_dir(),
2565
2574
                                    possible_transports=possible_transports)
2566
2575
        super(LocationStore, self).__init__(t, 'locations.conf')
2567
2576