diff mercurial/transaction.py @ 421:43b8da7420a9

[PATCH] rename under the other OS -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] rename under the other OS From: K Thananchayan <thananck@yahoo.com> Rename fails under windows if dest file exists. This patch add a rename method to util module that removes the dest file and retries if initial attempt fails. manifest hash: 2744d9fd1717e15133b411a269df909fa8ec0faf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCuNzDywK+sNU5EO8RAsPBAJ9NQN3bTuJvTem5x+utGnoMkhYc0QCbBFSJ PoMP69H1UnVE6drFlnlFE0s= =pePw -----END PGP SIGNATURE-----
author mpm@selenic.com
date Tue, 21 Jun 2005 19:36:35 -0800
parents 5dcbe4d9a30c
children 688d03d6997a
line wrap: on
line diff
--- a/mercurial/transaction.py	Tue Jun 21 19:33:13 2005 -0800
+++ b/mercurial/transaction.py	Tue Jun 21 19:36:35 2005 -0800
@@ -12,6 +12,7 @@
 # of the GNU General Public License, incorporated herein by reference.
 import os
+import util
 class transaction:
     def __init__(self, opener, journal, after = None):
@@ -46,7 +47,7 @@
         self.entries = []
         if self.after:
-            os.rename(self.journal, self.after)
+            util.rename(self.journal, self.after)