/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/transform.py

  • Committer: Aaron Bentley
  • Date: 2009-07-15 13:45:28 UTC
  • mto: This revision was merged to the branch mainline in revision 4538.
  • Revision ID: aaron@aaronbentley.com-20090715134528-00j9j8wy1gsfixxc
Check for malformed transforms before committing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
442
442
        conflicts.extend(self._overwrite_conflicts())
443
443
        return conflicts
444
444
 
 
445
    def _check_malformed(self):
 
446
        conflicts = self.find_conflicts()
 
447
        if len(conflicts) != 0:
 
448
            raise MalformedTransform(conflicts=conflicts)
 
449
 
445
450
    def _add_tree_children(self):
446
451
        """Add all the children of all active parents to the known paths.
447
452
 
867
872
        :param merge_parents: Additional parents specified by pending merges.
868
873
        :return: The revision_id of the revision committed.
869
874
        """
 
875
        self._check_malformed()
870
876
        if strict:
871
877
            unversioned = set(self._new_contents).difference(set(self._new_id))
872
878
            for trans_id in unversioned:
1390
1396
                continue
1391
1397
            yield self.trans_id_tree_path(childpath)
1392
1398
 
1393
 
 
1394
1399
    def apply(self, no_conflicts=False, precomputed_delta=None, _mover=None):
1395
1400
        """Apply all changes to the inventory and filesystem.
1396
1401
 
1406
1411
        :param _mover: Supply an alternate FileMover, for testing
1407
1412
        """
1408
1413
        if not no_conflicts:
1409
 
            conflicts = self.find_conflicts()
1410
 
            if len(conflicts) != 0:
1411
 
                raise MalformedTransform(conflicts=conflicts)
 
1414
            self._check_malformed()
1412
1415
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
1413
1416
        try:
1414
1417
            if precomputed_delta is None: