diff hgext/obsolete.py @ 83:97a5c943db19

Compat with mercurial 1.9.2
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 19 Sep 2011 01:55:35 +0200
parents 5d029a358252
children c4cc5f3bcf12
line wrap: on
line diff
--- a/hgext/obsolete.py	Mon Sep 19 01:11:10 2011 +0200
+++ b/hgext/obsolete.py	Mon Sep 19 01:55:35 2011 +0200
@@ -350,7 +350,10 @@
             f = self.opener('obsolete-relations', 'w', atomictemp=True)
             try:
                 _obsserialise(self._obssubrels, f)
-                f.rename()
+                try:
+                    f.rename()
+                except AttributeError: # old version
+                    f.close()
             finally:
                 f.close()