/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: Jelmer Vernooij
  • Date: 2009-10-19 18:16:56 UTC
  • mfrom: (4757 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4833.
  • Revision ID: jelmer@samba.org-20091019181656-b1gy3j0a2u7h2gcv
merge bzr.dev.

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.