~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2005-10-06 03:57:20 UTC
  • mto: (1185.12.13)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: aaron.bentley@utoronto.ca-20051006035720-2e50eaeca13837bc
Commit aborts with conflicts in the tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1005
1005
    
1006
1006
    def run(self, message=None, file=None, verbose=True, selected_list=None,
1007
1007
            unchanged=False):
1008
 
        from bzrlib.errors import PointlessCommit
 
1008
        from bzrlib.errors import PointlessCommit, ConflictsInTree
1009
1009
        from bzrlib.msgeditor import edit_commit_message
1010
1010
        from bzrlib.status import show_status
1011
1011
        from cStringIO import StringIO
1013
1013
        b = Branch.open_containing('.')
1014
1014
        if selected_list:
1015
1015
            selected_list = [b.relpath(s) for s in selected_list]
 
1016
 
1016
1017
            
1017
1018
        if not message and not file:
1018
1019
            catcher = StringIO()
1039
1040
            # perhaps prepare the commit; get the message; then actually commit
1040
1041
            raise BzrCommandError("no changes to commit",
1041
1042
                                  ["use --unchanged to commit anyhow"])
 
1043
        except ConflictsInTree:
 
1044
            raise BzrCommandError("Conflicts detected in working tree.  "
 
1045
                'Use "bzr conflicts" to list, "bzr resolve FILE" to resolve.')
1042
1046
 
1043
1047
 
1044
1048
class cmd_check(Command):