~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Jonathan Riddell
  • Date: 2011-05-25 15:18:31 UTC
  • mto: This revision was merged to the branch mainline in revision 5965.
  • Revision ID: jriddell@canonical.com-20110525151831-8tnxop1epk3iug2t
Add commit message hook

Show diffs side-by-side

added added

removed removed

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