~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Martin Pool
  • Date: 2005-06-24 11:04:55 UTC
  • Revision ID: mbp@sourcefrog.net-20050624110455-b0e54cd5f96691e5
- better quotefn for windows: use doublequotes for strings with 
  strange characters, not backslashes
- new backup_file() routine

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
    finally:
99
99
        outf.close()
100
100
 
101
 
def rename(path_from, path_to):
102
 
    """Basically the same as os.rename() just special for win32"""
103
 
    if sys.platform == 'win32':
104
 
        try:
105
 
            os.remove(path_to)
106
 
        except OSError, e:
107
 
            if e.errno != e.ENOENT:
108
 
                raise
109
 
    os.rename(path_from, path_to)
110
 
 
111
 
 
112
101
 
113
102
 
114
103