~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Aaron Bentley
  • Date: 2006-04-12 05:43:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1655.
  • Revision ID: aaron.bentley@utoronto.ca-20060412054322-ba4676fe659f2707
Handle resolving conflicts with directories properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
549
549
            raise
550
550
        copyfile(src, dest)
551
551
 
 
552
def delete_any(full_path):
 
553
    """Delete a file or directory."""
 
554
    try:
 
555
        os.unlink(full_path)
 
556
    except OSError, e:
 
557
    # We may be renaming a dangling inventory id
 
558
        if e.errno not in (errno.EISDIR, errno.EACCES, errno.EPERM):
 
559
            raise
 
560
        os.rmdir(full_path)
 
561
 
552
562
 
553
563
def has_symlinks():
554
564
    if hasattr(os, 'symlink'):