diff mercurial/tags.py @ 14662:2b30124c7d8a

tags: don't allow environment errors to be raised from _writetagscache See https://bitbucket.org/tortoisehg/thg/issue/719
author Steve Borho <steve@borho.org>
date Thu, 16 Jun 2011 15:26:17 -0500
parents 135e244776f0
children 774da7121fc9
line wrap: on
line diff
--- a/mercurial/tags.py	Fri Jun 17 13:31:23 2011 -0300
+++ b/mercurial/tags.py	Thu Jun 16 15:26:17 2011 -0500
@@ -286,4 +286,7 @@
     for (name, (node, hist)) in cachetags.iteritems():
         cachefile.write("%s %s\n" % (hex(node), name))
 
-    cachefile.rename()
+    try:
+        cachefile.rename()
+    except (OSError, IOError):
+        pass