~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: 2006-09-10 18:57:20 UTC
  • mfrom: (1910.2.48 format-bumps)
  • Revision ID: pqm@pqm.ubuntu.com-20060910185720-1bcc17b99fe77687
Add new format to support nested trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
            self._populate_new_inv()
296
296
            self._report_deletes()
297
297
 
298
 
            if not (self.allow_pointless
299
 
                    or len(self.parents) > 1
300
 
                    or self.builder.new_inventory != self.basis_inv):
301
 
                raise PointlessCommit()
 
298
            self._check_pointless()
302
299
 
303
300
            self._emit_progress_update()
304
301
            # TODO: Now the new inventory is known, check for conflicts and
346
343
            self._cleanup()
347
344
        return self.rev_id
348
345
 
 
346
    def _check_pointless(self):
 
347
        if self.allow_pointless:
 
348
            return
 
349
        # A merge with no effect on files
 
350
        if len(self.parents) > 1:
 
351
            return
 
352
        # work around the fact that a newly-initted tree does differ from its
 
353
        # basis
 
354
        if len(self.builder.new_inventory) != len(self.basis_inv):
 
355
            return
 
356
        if (len(self.builder.new_inventory) != 1 and
 
357
            self.builder.new_inventory != self.basis_inv):
 
358
            return
 
359
        raise PointlessCommit()
 
360
 
349
361
    def _check_bound_branch(self):
350
362
        """Check to see if the local branch is bound.
351
363