~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-07 11:22:03 UTC
  • mfrom: (4869.1.1 integration2)
  • Revision ID: pqm@pqm.ubuntu.com-20091207112203-lrudgmkz8hfknidz
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