/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-08-21 15:03:26 UTC
  • mto: This revision was merged to the branch mainline in revision 2765.
  • Revision ID: abentley@panoramicfeedback.com-20070821150326-br7qk4twfmx62su8
Make TreeTransform commits rollbackable

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
            except OSError, e:
109
109
                if e.errno == errno.EEXIST:
110
110
                    raise ExistingLimbo(self._limbodir)
 
111
            self._deletiondir = urlutils.local_path_from_url(
 
112
                control_files.controlfilename('pending-deletion'))
 
113
            os.mkdir(self._deletiondir)
111
114
        except: 
112
115
            self._tree.unlock()
113
116
            raise
170
173
            except OSError:
171
174
                # We don't especially care *why* the dir is immortal.
172
175
                raise ImmortalLimbo(self._limbodir)
 
176
            os.rmdir(self._deletiondir)
173
177
        finally:
174
178
            self._tree.unlock()
175
179
            self._tree = None
821
825
            except:
822
826
                mover.rollback()
823
827
                raise
 
828
            else:
 
829
                mover.apply_deletions()
824
830
        finally:
825
831
            child_pb.finished()
826
832
        self._tree.apply_inventory_delta(inventory_delta)
877
883
                child_pb.update('removing file', num, len(tree_paths))
878
884
                full_path = self._tree.abspath(path)
879
885
                if trans_id in self._removed_contents:
880
 
                    delete_any(full_path)
 
886
                    mover.pre_delete(full_path, os.path.join(self._deletiondir,
 
887
                                     trans_id))
881
888
                elif trans_id in self._new_name or trans_id in \
882
889
                    self._new_parent:
883
890
                    try: