~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Martin Pool
  • Date: 2009-06-30 04:08:12 UTC
  • mfrom: (4440.1.3 bzr-trunk)
  • mto: This revision was merged to the branch mainline in revision 4491.
  • Revision ID: mbp@sourcefrog.net-20090630040812-c5070bmkzjo6546s
merge fix for forcing readonly deletion, and tweak

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: