Commit d26bc0f7 authored by Guido van Rossum's avatar Guido van Rossum

mac robustness: default timezone, unlink target before rename

parent f553f00c
......@@ -6,6 +6,8 @@ import time
import md5
import fnmatch
if not hasattr(time, 'timezone'):
time.timezone = 0
class File:
......@@ -282,6 +284,8 @@ class CVS:
def backup(self, file):
if os.path.isfile(file):
bfile = file + '~'
try: os.unlink(bfile)
except os.error: pass
os.rename(file, bfile)
def ignored(self, file):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment