~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(jr) New hook set_commit_message in bzrlib.msgeditor to set a commit message
 and revision properties. (Jonathan Riddell, #274578) (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3193
3193
        from bzrlib.msgeditor import (
3194
3194
            edit_commit_message_encoded,
3195
3195
            generate_commit_message_template,
3196
 
            make_commit_message_template_encoded
 
3196
            make_commit_message_template_encoded,
 
3197
            set_commit_message,
3197
3198
        )
3198
3199
 
3199
3200
        commit_stamp = offset = None
3265
3266
                # make_commit_message_template_encoded returns user encoding.
3266
3267
                # We probably want to be using edit_commit_message instead to
3267
3268
                # avoid this.
3268
 
                start_message = generate_commit_message_template(commit_obj)
3269
 
                my_message = edit_commit_message_encoded(text,
3270
 
                    start_message=start_message)
 
3269
                my_message = set_commit_message(commit_obj)
 
3270
                if my_message is None:
 
3271
                    start_message = generate_commit_message_template(commit_obj)
 
3272
                    my_message = edit_commit_message_encoded(text,
 
3273
                        start_message=start_message)
3271
3274
                if my_message is None:
3272
3275
                    raise errors.BzrCommandError("please specify a commit"
3273
3276
                        " message with either --message or --file")