~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-03 18:13:19 UTC
  • mto: (4782.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 4783.
  • Revision ID: john@arbash-meinel.com-20091103181319-9rhyiys2wef0k41w
Fix bug #433779, sanitize '\r' characters in commit.

This only applies to messages given via '-m'. We already had code that
read -F in 'text' mode. And if someone is directly using 'tree.commit()'
we would like them to do the sanitizing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3025
3025
        def get_message(commit_obj):
3026
3026
            """Callback to get commit message"""
3027
3027
            my_message = message
 
3028
            if my_message is not None and '\r' in my_message:
 
3029
                my_message = my_message.replace('\r\n', '\n')
 
3030
                my_message = my_message.replace('\r', '\n')
3028
3031
            if my_message is None and not file:
3029
3032
                t = make_commit_message_template_encoded(tree,
3030
3033
                        selected_list, diff=show_diff,