~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Robert Collins
  • Date: 2005-10-17 10:50:39 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051017105039-87b9e081c41cb906
Add re-sign command to generate a digital signature on a single revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
 
79
79
    def gpg_signing_command(self):
80
80
        """What program should be used to sign signatures?"""
81
 
        return "gpg"
 
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
82
89
 
83
90
    def __init__(self):
84
91
        super(Config, self).__init__()
172
179
            if self._get_parser().has_option(section, 'email'):
173
180
                return self._get_parser().get(section, 'email')
174
181
 
175
 
    def gpg_signing_command(self):
 
182
    def _gpg_signing_command(self):
176
183
        """See Config.gpg_signing_command."""
177
184
        section = self._get_section()
178
185
        if section is not None:
259
266
        matches.sort(reverse=True)
260
267
        return matches[0][1]
261
268
 
262
 
    def gpg_signing_command(self):
 
269
    def _gpg_signing_command(self):
263
270
        """See Config.gpg_signing_command."""
264
 
        command = super(LocationConfig, self).gpg_signing_command()
 
271
        command = super(LocationConfig, self)._gpg_signing_command()
265
272
        if command is not None:
266
273
            return command
267
 
        return self._get_global_config().gpg_signing_command()
 
274
        return self._get_global_config()._gpg_signing_command()
268
275
 
269
276
    def _get_user_id(self):
270
277
        user_id = super(LocationConfig, self)._get_user_id()
308
315
        """See Config._get_signature_checking."""
309
316
        return self._get_location_config()._get_signature_checking()
310
317
 
311
 
    def gpg_signing_command(self):
 
318
    def _gpg_signing_command(self):
312
319
        """See Config.gpg_signing_command."""
313
 
        return self._get_location_config().gpg_signing_command()
 
320
        return self._get_location_config()._gpg_signing_command()
314
321
        
315
322
    def __init__(self, branch):
316
323
        super(BranchConfig, self).__init__()