~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2009-12-07 10:38:09 UTC
  • mfrom: (4795.5.14 forgot-commit-message)
  • mto: This revision was merged to the branch mainline in revision 4870.
  • Revision ID: v.ladeuil+lp@free.fr-20091207103809-63ocky0xx7nudbnb
commit warns for file-name-like messages

Show diffs side-by-side

added added

removed removed

Lines of Context:
3066
3066
        if local and not tree.branch.get_bound_location():
3067
3067
            raise errors.LocalRequiresBoundBranch()
3068
3068
 
 
3069
        if message is not None:
 
3070
            if osutils.lexists(message):
 
3071
                warning_msg = ("The commit message is a file"
 
3072
                    " name: \"%(filename)s\".\n"
 
3073
                    "(use --file \"%(filename)s\" to take commit message from"
 
3074
                    " that file)" % { 'filename': message })
 
3075
                ui.ui_factory.show_warning(warning_msg)
 
3076
 
3069
3077
        def get_message(commit_obj):
3070
3078
            """Callback to get commit message"""
3071
3079
            my_message = message