~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Martin Pool
  • Date: 2006-03-22 21:54:32 UTC
  • mto: (1668.1.8 bzr-0.8.mbp)
  • mto: This revision was merged to the branch mainline in revision 1710.
  • Revision ID: mbp@sourcefrog.net-20060322215432-77bd8f48df80b52d
(register-branch) Add --author option and respect --dry-run
Print the result of registration to stdout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
         Option('branch-description',
63
63
                'longer description of the purpose or contents of the branch',
64
64
                unicode),
 
65
         Option('author', 
 
66
                'email of the branch\'s author, if not yourself',
 
67
                unicode),
65
68
         Option('dry-run',
66
69
                'prepare the request but don\'t actually send it')
67
70
        ]
73
76
            branch_name='',
74
77
            branch_title='',
75
78
            branch_description='',
 
79
            author='',
76
80
            dry_run=False):
77
81
        from lp_registration import BranchRegistrationRequest
78
 
        if dry_run:
79
 
            raise NotImplementedError('--dry-run for register-branch')
80
82
        rego = BranchRegistrationRequest(branch_url=branch_url, 
81
83
                                         branch_name=branch_name,
82
84
                                         branch_title=branch_title,
83
85
                                         branch_description=branch_description,
84
86
                                         product_name=product,
 
87
                                         author_email=author,
85
88
                                         )
86
 
        rego.register_interactive()
 
89
        if not dry_run:
 
90
            rego.register_interactive()
87
91
 
88
92
register_command(cmd_register_branch)
89
93