~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-30 05:12:27 UTC
  • mfrom: (4490.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090630051227-ncar0w60u6cbyydk
(mbp) force deletion of readonly files from TreeTransform

Show diffs side-by-side

added added

removed removed

Lines of Context:
995
995
                       self._new_contents.iteritems()]
996
996
            entries.sort(reverse=True)
997
997
            for path, trans_id, kind in entries:
998
 
                if kind == "directory":
999
 
                    os.rmdir(path)
1000
 
                else:
1001
 
                    os.unlink(path)
 
998
                delete_any(path)
1002
999
            try:
1003
 
                os.rmdir(self._limbodir)
 
1000
                delete_any(self._limbodir)
1004
1001
            except OSError:
1005
1002
                # We don't especially care *why* the dir is immortal.
1006
1003
                raise ImmortalLimbo(self._limbodir)
1007
1004
            try:
1008
1005
                if self._deletiondir is not None:
1009
 
                    os.rmdir(self._deletiondir)
 
1006
                    delete_any(self._deletiondir)
1010
1007
            except OSError:
1011
1008
                raise errors.ImmortalPendingDeletion(self._deletiondir)
1012
1009
        finally: