Code review comment for lp:~shawn111/bzr/lp_propose_message

Revision history for this message
Shawn Wang (shawn111) wrote :

@Richard,

I thought it is not necessary to have self.commit_message.strip().encode('utf-8').
You can refer below two pieces of code.
in bzrlib/plugins/launchpad/cmds.py, the option 'message' is type=unicode.
in bzrlib/plugins/launchpad/lp_propose.py, self.call_webservice already use commit_message=self.commit_message.

bzrlib/plugins/launchpad/cmds.py

class cmd_lp_propose_merge(Command):
...
    takes_options = [Option('staging',
                            help='Propose the merge on staging.'),
                     Option('message', short_name='m', type=unicode,
                            help='Commit message.'),
                     Option('approve',
                            help=('Mark the proposal as approved immediately, '
                                  'setting the approved revision to tip.')),
                     Option('fixes', 'The bug this proposal fixes.', str),
                     ListOption('review', short_name='R', type=unicode,
                            help='Requested reviewer and optional type.')]

bzrlib/plugins/launchpad/lp_propose.py
    def create_proposal(self):
        """Perform the submission."""
...
        initial_comment = self.get_comment(prerequisite_branch)
        mp = self.call_webservice(
            self.source_branch.lp.createMergeProposal,
            target_branch=self.target_branch.lp,
            prerequisite_branch=prereq,
            initial_comment=initial_comment,
            commit_message=self.commit_message, reviewers=reviewers,
            review_types=review_types)

« Back to merge proposal