~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2005-10-06 05:13:21 UTC
  • mfrom: (1393.3.3)
  • Revision ID: robertc@robertcollins.net-20051006051321-88f1053c3bf1ca4a
merge in an adjusted version of Jelmer's empty-log detection patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1007
1007
        if selected_list:
1008
1008
            selected_list = [b.relpath(s) for s in selected_list]
1009
1009
            
1010
 
        if not message and not file:
 
1010
        if message is None and not file:
1011
1011
            catcher = StringIO()
1012
1012
            show_status(b, specific_files=selected_list,
1013
1013
                        to_file=catcher)
1014
1014
            message = edit_commit_message(catcher.getvalue())
1015
 
            
 
1015
 
1016
1016
            if message is None:
1017
1017
                raise BzrCommandError("please specify a commit message"
1018
1018
                                      " with either --message or --file")
1023
1023
            import codecs
1024
1024
            message = codecs.open(file, 'rt', bzrlib.user_encoding).read()
1025
1025
 
 
1026
        if message == "":
 
1027
                raise BzrCommandError("empty commit message specified")
 
1028
            
1026
1029
        try:
1027
1030
            b.commit(message,
1028
1031
                     specific_files=selected_list,