~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Make commit verbose mode work!.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1459
1459
 
1460
1460
    def run(self, message=None, file=None, verbose=True, selected_list=None,
1461
1461
            unchanged=False, strict=False, local=False):
 
1462
        from bzrlib.commit import (NullCommitReporter, ReportCommitToLog)
1462
1463
        from bzrlib.errors import (PointlessCommit, ConflictsInTree,
1463
1464
                StrictCommitFailed)
1464
1465
        from bzrlib.msgeditor import edit_commit_message, \
1492
1493
 
1493
1494
        if message == "":
1494
1495
                raise BzrCommandError("empty commit message specified")
1495
 
            
 
1496
        
 
1497
        if verbose:
 
1498
            reporter = ReportCommitToLog()
 
1499
        else:
 
1500
            reporter = NullCommitReporter()
 
1501
        
1496
1502
        try:
1497
1503
            tree.commit(message, specific_files=selected_list,
1498
 
                        allow_pointless=unchanged, strict=strict, local=local)
 
1504
                        allow_pointless=unchanged, strict=strict, local=local,
 
1505
                        reporter=reporter)
1499
1506
        except PointlessCommit:
1500
1507
            # FIXME: This should really happen before the file is read in;
1501
1508
            # perhaps prepare the commit; get the message; then actually commit
1512
1519
                                  + ' Either unbind, update, or'
1513
1520
                                    ' pass --local to commit.')
1514
1521
 
1515
 
        note('Committed revision %d.' % (tree.branch.revno(),))
1516
 
 
1517
1522
 
1518
1523
class cmd_check(Command):
1519
1524
    """Validate consistency of branch history.