/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: 2007-07-12 17:46:52 UTC
  • mto: This revision was merged to the branch mainline in revision 2617.
  • Revision ID: abentley@panoramicfeedback.com-20070712174652-vof6knvyoca27gsk
Avoid redundant conflict check

Show diffs side-by-side

added added

removed removed

Lines of Context:
785
785
            return True
786
786
        return False
787
787
            
788
 
    def apply(self):
 
788
    def apply(self, no_conflicts=False):
789
789
        """Apply all changes to the inventory and filesystem.
790
790
        
791
791
        If filesystem or inventory conflicts are present, MalformedTransform
792
792
        will be thrown.
793
793
 
794
794
        If apply succeeds, finalize is not necessary.
 
795
 
 
796
        :param no_conflicts: if True, the caller guarantees there are no
 
797
            conflicts, so no check is made.
795
798
        """
796
 
        conflicts = self.find_conflicts()
797
 
        if len(conflicts) != 0:
798
 
            raise MalformedTransform(conflicts=conflicts)
 
799
        if not no_conflicts:
 
800
            conflicts = self.find_conflicts()
 
801
            if len(conflicts) != 0:
 
802
                raise MalformedTransform(conflicts=conflicts)
799
803
        inv = self._tree.inventory
800
804
        inventory_delta = []
801
805
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()