/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 breezy/plugins/propose/cmds.py

Add --overwrite argument to 'brz propose'.

Merged from https://code.launchpad.net/~jelmer/brz/propose-overwrite/+merge/389937

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
               help='Allow collaboration from target branch maintainer(s)'),
165
165
        Option('allow-empty',
166
166
               help='Do not prevent empty merge proposals.'),
 
167
        Option('overwrite', help="Overwrite existing commits."),
167
168
        ]
168
169
    takes_args = ['submit_branch?']
169
170
 
172
173
    def run(self, submit_branch=None, directory='.', hoster=None,
173
174
            reviewers=None, name=None, no_allow_lossy=False, description=None,
174
175
            labels=None, prerequisite=None, commit_message=None, wip=False,
175
 
            allow_collaboration=False, allow_empty=False):
 
176
            allow_collaboration=False, allow_empty=False, overwrite=False):
176
177
        tree, branch, relpath = (
177
178
            controldir.ControlDir.open_containing_tree_or_branch(directory))
178
179
        if submit_branch is None:
192
193
        if name is None:
193
194
            name = branch_name(branch)
194
195
        remote_branch, public_branch_url = hoster.publish_derived(
195
 
            branch, target, name=name, allow_lossy=not no_allow_lossy)
 
196
            branch, target, name=name, allow_lossy=not no_allow_lossy,
 
197
            overwrite=overwrite)
196
198
        branch.set_push_location(remote_branch.user_url)
197
199
        branch.set_submit_branch(target.user_url)
198
200
        note(gettext('Published branch to %s') % public_branch_url)