~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Aaron Bentley
  • Date: 2006-02-24 17:05:23 UTC
  • mto: (2027.1.2 revert-subpath-56549)
  • mto: This revision was merged to the branch mainline in revision 1595.
  • Revision ID: abentley@panoramicfeedback.com-20060224170523-9ec3bd5c7a1ed4c7
Got transform.apply to list modified paths

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    map[key] = value
37
37
 
38
38
 
 
39
class _TransformResults(object):
 
40
    def __init__(self, modified_paths):
 
41
        object.__init__(self)
 
42
        self.modified_paths = modified_paths
 
43
 
 
44
 
39
45
class TreeTransform(object):
40
46
    """Represent a tree transformation.
41
47
    
660
666
        limbo_inv = {}
661
667
        inv = self._tree.inventory
662
668
        self._apply_removals(inv, limbo_inv)
663
 
        self._apply_insertions(inv, limbo_inv)
 
669
        modified_paths = self._apply_insertions(inv, limbo_inv)
664
670
        self._tree._write_inventory(inv)
665
671
        self.__done = True
666
672
        self.finalize()
 
673
        return _TransformResults(modified_paths)
667
674
 
668
675
    def _limbo_name(self, trans_id):
669
676
        """Generate the limbo name of a file"""
711
718
        parent-to-child order.
712
719
        """
713
720
        new_paths = self.new_paths()
 
721
        modified_paths = []
714
722
        for num, (path, trans_id) in enumerate(new_paths):
715
723
            self._pb.update('adding file', num+1, len(new_paths))
716
724
            try:
726
734
                    if e.errno != errno.ENOENT:
727
735
                        raise
728
736
                if trans_id in self._new_contents:
 
737
                    modified_paths.append(full_path)
729
738
                    del self._new_contents[trans_id]
730
739
 
731
740
            if trans_id in self._new_id:
744
753
            if trans_id in self._new_executability:
745
754
                self._set_executability(path, inv, trans_id)
746
755
        self._pb.clear()
 
756
        return modified_paths
747
757
 
748
758
    def _set_executability(self, path, inv, trans_id):
749
759
        """Set the executability of versioned files """