tags: don't allow environment errors to be raised from _writetagscache
authorSteve Borho <steve@borho.org>
Thu, 16 Jun 2011 15:26:17 -0500
changeset 14662 2b30124c7d8a
parent 14661 8bbb899620ea
child 14663 88cb01c4575e
tags: don't allow environment errors to be raised from _writetagscache See https://bitbucket.org/tortoisehg/thg/issue/719
mercurial/tags.py
--- 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