/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 bzrlib/config.py

  • Committer: Aaron Bentley
  • Date: 2005-10-18 19:47:04 UTC
  • mfrom: (1460)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1474.
  • Revision ID: abentley@panoramicfeedback.com-20051018194704-47d6827cc1d0d11b
Merged more config stuff from Robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
email=Your Name <your@email.address>
27
27
check_signatures=require|ignore|check-available(default)
28
28
create_signatures=always|never|when-required(default)
 
29
gpg_signing_command=name-of-program
29
30
 
30
31
in branches.conf, you specify the url of a branch and options for it.
31
32
Wildcards may be used - * and ? as normal in shell completion. Options
75
76
    def _get_signature_checking(self):
76
77
        """Template method to override signature checking policy."""
77
78
 
 
79
    def gpg_signing_command(self):
 
80
        """What program should be used to sign signatures?"""
 
81
        result = self._gpg_signing_command()
 
82
        if result is None:
 
83
            result = "gpg"
 
84
        return result
 
85
 
 
86
    def _gpg_signing_command(self):
 
87
        """See gpg_signing_command()."""
 
88
        return None
 
89
 
78
90
    def __init__(self):
79
91
        super(Config, self).__init__()
80
92
 
192
204
        except KeyError:
193
205
            pass
194
206
 
 
207
    def _gpg_signing_command(self):
 
208
        """See Config.gpg_signing_command."""
 
209
        try:
 
210
            return self._config_val('gpg_signing_command')
 
211
        except KeyError:
 
212
            pass
 
213
 
195
214
    def __init__(self, get_filename):
196
215
        super(IniBasedConfig, self).__init__()
197
216
        self._get_filename = get_filename
276
295
        matches.sort(reverse=True)
277
296
        return matches[0][1]
278
297
 
 
298
    def _gpg_signing_command(self):
 
299
        """See Config.gpg_signing_command."""
 
300
        command = super(LocationConfig, self)._gpg_signing_command()
 
301
        if command is not None:
 
302
            return command
 
303
        return self._get_global_config()._gpg_signing_command()
 
304
 
279
305
    def _get_user_id(self):
280
306
        user_id = super(LocationConfig, self)._get_user_id()
281
307
        if user_id is not None:
318
344
        """See Config._get_signature_checking."""
319
345
        return self._get_location_config()._get_signature_checking()
320
346
 
 
347
    def _gpg_signing_command(self):
 
348
        """See Config.gpg_signing_command."""
 
349
        return self._get_location_config()._gpg_signing_command()
 
350
        
321
351
    def __init__(self, branch):
322
352
        super(BranchConfig, self).__init__()
323
353
        self._location_config = None