~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-20 19:46:46 UTC
  • mfrom: (4759 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4771.
  • Revision ID: john@arbash-meinel.com-20091020194646-wnqpd15qs19y28z7
Merge bzr.dev 4759, bringing in static_tuple and streaming improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1122
1122
                continue
1123
1123
            new_path = self._limbo_name(trans_id)
1124
1124
            os.rename(old_path, new_path)
 
1125
            for descendant in self._limbo_descendants(trans_id):
 
1126
                desc_path = self._limbo_files[descendant]
 
1127
                desc_path = new_path + desc_path[len(old_path):]
 
1128
                self._limbo_files[descendant] = desc_path
 
1129
 
 
1130
    def _limbo_descendants(self, trans_id):
 
1131
        """Return the set of trans_ids whose limbo paths descend from this."""
 
1132
        descendants = set(self._limbo_children.get(trans_id, []))
 
1133
        for descendant in list(descendants):
 
1134
            descendants.update(self._limbo_descendants(descendant))
 
1135
        return descendants
1125
1136
 
1126
1137
    def create_file(self, contents, trans_id, mode_id=None):
1127
1138
        """Schedule creation of a new file.