~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-14 21:02:06 UTC
  • mfrom: (5847.3.2 use-public-basis-delta)
  • Revision ID: pqm@pqm.ubuntu.com-20110514210206-ez4ltcg5k90tidxe
(jelmer) CommitBuilder.any_changes() no longer returns True for changes that
 only set the tree root. (Jelmer Vernooij)

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 and
503
 
            ((self.builder.new_inventory is not None and
504
 
             len(self.builder.new_inventory) == 1) or
505
 
            len(self.builder._basis_delta) == 1)):
506
 
            raise PointlessCommit()
507
498
        if self.builder.any_changes():
508
499
            return
509
500
        raise PointlessCommit()