/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-12 12:59:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5862.
  • Revision ID: jelmer@samba.org-20110512125922-687mluena8y88m1y
Move root checking to VersionedFileRepository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
495
495
        # A merge with no effect on files
496
496
        if len(self.parents) > 1:
497
497
            return
498
 
        # TODO: we could simplify this by using self.builder.basis_delta.
499
 
 
500
 
        # The initial commit adds a root directory, but this in itself is not
501
 
        # a worthwhile commit.
502
 
        if self.basis_revid == revision.NULL_REVISION:
503
 
            if self.use_record_iter_changes:
504
 
                if len(self.builder.get_basis_delta()) == 1:
505
 
                    raise PointlessCommit()
506
 
            else:
507
 
                if (self.builder.new_inventory is not None and
508
 
                    len(self.builder.new_inventory) == 1):
509
 
                    raise PointlessCommit()
510
498
        if self.builder.any_changes():
511
499
            return
512
500
        raise PointlessCommit()