~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-03-02 04:07:59 UTC
  • mto: (2323.6.9 0.15-integration)
  • mto: This revision was merged to the branch mainline in revision 2330.
  • Revision ID: aaron.bentley@utoronto.ca-20070302040759-5xs52rvht12z9pld
Enable signing merge directives

Show diffs side-by-side

added added

removed removed

Lines of Context:
3180
3180
 
3181
3181
    takes_options = [RegistryOption('patch-type',
3182
3182
        'The type of patch to include in the directive',
3183
 
        _directive_patch_type, value_switches=True)]
 
3183
        _directive_patch_type, value_switches=True),
 
3184
        Option('sign', help='GPG-sign the directive')]
3184
3185
 
3185
 
    def run(self, submit_branch=None, public_branch=None, patch_type='bundle'):
 
3186
    def run(self, submit_branch=None, public_branch=None, patch_type='bundle',
 
3187
            sign=False):
3186
3188
        branch = Branch.open('.')
3187
3189
        config_submit_branch = branch.get_submit_branch()
3188
3190
        if submit_branch is None:
3208
3210
            branch.repository, branch.last_revision(), time.time(),
3209
3211
            osutils.local_time_offset(), submit_branch,
3210
3212
            public_branch=public_branch, patch_type=patch_type)
3211
 
        self.outf.writelines(directive.to_lines())
 
3213
        if sign:
 
3214
            self.outf.write(directive.to_signed(branch))
 
3215
        else:
 
3216
            self.outf.writelines(directive.to_lines())
3212
3217
 
3213
3218
 
3214
3219
# command-line interpretation helper for merge-related commands