~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Martin Pool
  • Date: 2010-04-30 07:24:01 UTC
  • mto: This revision was merged to the branch mainline in revision 5228.
  • Revision ID: mbp@sourcefrog.net-20100430072401-y3y1v0jauxme732n
Remove OS-level rename wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
388
388
        raise
389
389
 
390
390
 
391
 
def _wrapped_rename(old, new):
392
 
    """Rename a file or directory"""
393
 
    try:
394
 
        os.rename(old, new)
395
 
    except (IOError, OSError), e:
396
 
        # this is eventually called by all rename-like functions, so should 
397
 
        # catch all of them
398
 
        raise _add_rename_error_details(e, old, new)
399
 
 
400
 
 
401
391
def _mac_getcwd():
402
392
    return unicodedata.normalize('NFC', os.getcwdu())
403
393
 
408
398
realpath = _posix_realpath
409
399
pathjoin = os.path.join
410
400
normpath = os.path.normpath
411
 
rename = _wrapped_rename # overridden below on win32
 
401
rename = os.rename
412
402
getcwd = os.getcwdu
413
403
dirname = os.path.dirname
414
404
basename = os.path.basename