mercurial/util.py
changeset 421 43b8da7420a9
parent 419 28511fc21073
child 422 10c43444a38e
--- a/mercurial/util.py	Tue Jun 21 19:33:13 2005 -0800
+++ b/mercurial/util.py	Tue Jun 21 19:36:35 2005 -0800
@@ -7,6 +7,14 @@
 
 import os
 
+def rename(src, dst):
+    try:
+        os.rename(src, dst)
+    except:
+        os.unlink(dst)
+        os.rename(src, dst)
+
+# Platfor specific varients
 if os.name == 'nt':
     def pconvert(path):
         return path.replace("\\", "/")